HomePhabricator

[backport#15931 4/9] Add block_height field in struct Confirmation

Description

[backport#15931 4/9] Add block_height field in struct Confirmation

Summary:
At wallet loading, we rely on chain state querying to retrieve
height of txn, to do so we ensure that lock order is respected
between cs_main and cs_wallet.

If wallet loaded is the wallet-tool one, all wallet txn will
show up with a height of zero. It doesn't matter as confirmation
height is not used by wallet-tool.

Reorder arguments and document Confirmation calls to avoid
ambiguity.

Fixes nits left from #16624


https://github.com/bitcoin/bitcoin/pull/15931/commits/5971d3848e09abf571e5308185275296127efca4

Depends on D7508

Partial backport of Core PR15931

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Antoine Riard <ariard@student.42.fr>Authored on Apr 20 2019, 15:22
majcostaCommitted on Sep 22 2020, 14:58
majcostaPushed on Sep 22 2020, 14:58
Reviewer
Restricted Project
Differential Revision
D7509: [backport#15931 4/9] Add block_height field in struct Confirmation
Parents
rABCa49534be0208: [backport#15931 3/9] Replace CWalletTx::SetConf by Confirmation initialization…
Branches
Unknown
Tags
Unknown