Page MenuHomePhabricator

Merge #11281: Avoid permanent cs_main/cs_wallet lock during RescanFromTime
ClosedPublic

Authored by jasonbcox on May 7 2019, 22:59.

Details

Summary

7f81250 Mention that other RPC calls report keys as "imported" while txns are still missing (Jonas Schnelli)
ccd8ef6 Reduce cs_main lock in ReadBlockFromDisk, only read GetBlockPos under the lock (Jonas Schnelli)
bc356b4 Make sure WalletRescanReserver has successfully reserved the rescan (Jonas Schnelli)
dbf8556 Add RAII wallet rescan reserver (Jonas Schnelli)
8d0b610 Avoid pemanent cs_main/cs_wallet lock during wallet rescans (Jonas Schnelli)

Pull request description:

Right now, we are holding `cs_main`/`cs_wallet` during the whole rescan process (which can take a couple of hours).
This was probably only done because of laziness and it is an important show-stopper for #11200 (GUI rescan abort).

Tree-SHA512: 0fc3f82d0ee9b2f013e6bacba8d59f7334306660cd676cd64c47bb305c4cb7c7a36219d6a6f76023b74e5fe87f3ab9fc7fd2439e939f71aef653fddb0a1e23b1

Backport of Core PR11281
https://github.com/bitcoin/bitcoin/pull/11281/files
Completes T641
Depends on D2974

Reviewer note:
Destination* and Scripts* functions have been removed because they are related to segwit and
other Core features that we do not support.
You will notice that they are not present in the before or after changes in this diff.

Test Plan

make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr11281
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5761
Build 9584: Bitcoin ABC Buildbot (legacy)
Build 9583: arc lint + arc unit

Event Timeline

Fabien requested changes to this revision.May 8 2019, 09:36
Fabien added inline comments.
src/wallet/rpcdump.cpp
115 ↗(On Diff #8481)

Braces

638 ↗(On Diff #8481)

Braces

This revision now requires changes to proceed.May 8 2019, 09:36
This revision is now accepted and ready to land.May 9 2019, 06:37