HomePhabricator

Merge #12287: Optimise lock behaviour for GuessVerificationProgress()

Description

Merge #12287: Optimise lock behaviour for GuessVerificationProgress()

Summary:
90ba2df11 Fix missing cs_main lock for GuessVerificationProgress() (Jonas Schnelli)

Pull request description:

`GuessVerificationProgress()` needs `cs_main` due to accessing the `pindex->nChainTx`.
This adds a `AssertLockHeld` in `GuessVerificationProgress()` and adds the missing locks in...
* `LoadChainTip()`
* `ScanForWalletTransactions()` (got missed in #11281)
* GUI, `ClientModel::getVerificationProgress()` <--- **this may have GUI performance impacts**, but could be relaxed later with a cache or something more efficient.

Tree-SHA512: 13302946571422375f32af8e396b9d2c1180f2693ea363aeba9e98c8266ddec64fe7862bfdcbb5a93a4b12165a61eec1e51e4e7d7a8515fa50879095dc163412

Backport of Core PR12287
https://github.com/bitcoin/bitcoin/pull/12287/files
Completes T642
Depends on D2979

Test Plan:
make check
test_runner.py

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: deadalnix, Fabien, #bitcoin_abc

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

Details

Provenance
Jonas Schnelli <dev@jonasschnelli.ch>Authored on Jun 27 2019, 16:28
jasonbcoxCommitted on Jun 27 2019, 16:37
jasonbcoxPushed on Jun 27 2019, 16:59
Reviewer
Restricted Project
Differential Revision
D2980: Merge #12287: Optimise lock behaviour for GuessVerificationProgress()
Parents
rSTAGINGf5b783ddb69f: Merge #10789: Punctuation/grammer fixes in rpcwallet.cpp
Branches
Unknown
Tags
Unknown