HomePhabricator

Merge #12944: [wallet] ScanforWalletTransactions should mark input txns as dirty

Description

Merge #12944: [wallet] ScanforWalletTransactions should mark input txns as dirty

Summary:
3c292cc19 ScanforWalletTransactions should mark input txns as dirty (Gregory Sanders)

Pull request description:

I'm hitting a corner case in my mainnet wallet where I load a restore a wallet, call `rescanblockchain` from RPC, and it's "double counting" an output I've sent to myself since currently it never marks input transactions as dirty. This is fixed by a restart of the wallet.

Note that this only happens with keys with birthdate *after* the blocks containing the spent funds which gets scanned on startup, so it's hard to test without a set seed function.

Tree-SHA512: ee1fa152bb054b57ab4c734e355df10d241181e0372c81d583be61678fffbabe5ae60b09b05dc1bbbcfb4838df9d8538791d4c1d80a09b84d78ad2f50dcb0a61

Backport of Core PR12944
https://github.com/bitcoin/bitcoin/pull/12944/

Test Plan:

make check
test_runner.py

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

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

Details

Provenance
Jonas Schnelli <dev@jonasschnelli.ch>Authored on Jul 13 2018, 19:34
nakihitoCommitted on Dec 10 2019, 23:51
nakihitoPushed on Dec 11 2019, 00:46
Reviewer
Restricted Owners Package
Differential Revision
D4674: Merge #12944: [wallet] ScanforWalletTransactions should mark input txns as dirty
Parents
rSTAGING81c6819f381f: Log debug build status and warn when running benchmarks
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/14781, tag: phabricator/base/14758, tag: phabricator/base/14757