HomePhabricator

wallet: Avoid use of Chain::Lock in CWallet::ScanForWalletTransactions

Description

wallet: Avoid use of Chain::Lock in CWallet::ScanForWalletTransactions

Summary:
This is a step toward removing the Chain::Lock class and reducing cs_main
locking.

This change affects behavior in a few small ways.

  • If there's no max_height specified, percentage progress is measured ending at wallet last processed block instead of node tip
  • More consistent error reporting: Early check to see if start_block is on the active chain is removed, so start_block is always read and the triggers an error if it's unavailable

This is part [10/12] of Core PR17954 : https://github.com/bitcoin/bitcoin/pull/17954/commits/c0d07dc4cba7634cde4e8bf586557772f3248a42

Depends on D7872

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Jan 22 2020, 21:53
deadalnixCommitted on Oct 11 2020, 12:38
deadalnixPushed on Oct 11 2020, 12:38
Reviewer
Restricted Project
Differential Revision
D7873: wallet: Avoid use of Chain::Lock in CWallet::ScanForWalletTransactions
Parents
rABCa04008c4cae2: wallet: Add BlockUntilSyncedToCurrentChain to dumpwallet
Branches
Unknown
Tags
Unknown