aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2018-07-13 20:34:35 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2018-07-13 20:34:43 +0100
commit619cd29393b68426f3d9c0d7467509fadfa9f933 (patch)
tree7f40fb7975db9ecfb6c7c253beb529c5c924ffee /src/wallet/wallet.h
parent2ea7eb62b21affeb56fcea7433cfff9e5bc4742c (diff)
parent3c292cc190b1739ffcbec79b264aaded00c08e2c (diff)
downloadbitcoin-619cd29393b68426f3d9c0d7467509fadfa9f933.tar.xz
Merge #12944: [wallet] ScanforWalletTransactions should mark input txns as dirty
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
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index ef03a1eaed..0118ced687 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -708,9 +708,9 @@ private:
void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>);
- /* Used by TransactionAddedToMemorypool/BlockConnected/Disconnected.
+ /* Used by TransactionAddedToMemorypool/BlockConnected/Disconnected/ScanForWalletTransactions.
* Should be called with pindexBlock and posInBlock if this is for a transaction that is included in a block. */
- void SyncTransaction(const CTransactionRef& tx, const CBlockIndex *pindex = nullptr, int posInBlock = 0) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ void SyncTransaction(const CTransactionRef& tx, const CBlockIndex *pindex = nullptr, int posInBlock = 0, bool update_tx = true) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
/* the HD chain data model (external chain counters) */
CHDChain hdChain;