Page MenuHomePhabricator

Merge #12639: Reduce cs_main lock and avoid extra lookups of mapAddressBook in listunspent RPC
ClosedPublic

Authored by nakihito on Nov 22 2019, 23:24.

Details

Summary

Reduce cs_main lock in listunspent and refactor replacing three mapAddressBook lookups with one.

Backport of Core PR12639
https://github.com/bitcoin/bitcoin/pull/12639/

Test Plan
../configure --enable-debug
make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 22 2019, 23:24

Where is the rest of it?

The lock scope change currently conflicts with the AssertLockHeld(cs_main) added in D2980. I'm currently investing where the lock is not properly being applied. I figured I could do the two changes separately since they are pretty much independent changes.

Edit: D4542 actually shows the call site where cs_main is not being locked.

nakihito retitled this revision from refactor: Avoid extra lookups of mapAddressBook in listunspent RPC to Merge #12639: Reduce cs_main lock and avoid extra lookups of mapAddressBook in listunspent RPC.Nov 26 2019, 17:31
nakihito edited the summary of this revision. (Show Details)
nakihito edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Nov 26 2019, 23:13