HomePhabricator

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

Authored by Wladimir J. van der Laan <laanwj@gmail.com> on Jan 24 2018, 11:29.

Description

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

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

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D2979

Details

Committed
jasonbcoxMay 9 2019, 18:27
Pushed
jasonbcoxMay 9 2019, 18:27
Reviewer
Restricted Project
Differential Revision
D2979: Merge #11281: Avoid permanent cs_main/cs_wallet lock during RescanFromTime
Parents
rABC3bd53249b037: Merge #10489: build: silence gcc7's implicit fallthrough warning
Branches
Unknown
Tags
Unknown

Event Timeline