mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Merge bitcoin/bitcoin#28920: wallet: birth time update during tx scanning
1ce45baed7rpc: getwalletinfo, return wallet 'birthtime' (furszy)83c66444d0test: coverage for wallet birth time interaction with -reindex (furszy)6f497377aawallet: fix legacy spkm default birth time (furszy)75fbf444c1wallet: birth time update during tx scanning (furszy)b4306e3c8drefactor: rename FirstKeyTimeChanged to MaybeUpdateBirthTime (furszy) Pull request description: Fixing #28897. As the user may have imported a descriptor with a timestamp newer than the actual birth time of the first key (by setting 'timestamp=now'), the wallet needs to update the birth time when it detects a transaction older than the oldest descriptor timestamp. Testing Notes: Can cherry-pick the test commit on top of master. It will fail there. ACKs for top commit: Sjors: re-utACK1ce45baed7achow101: ACK1ce45baed7Tree-SHA512: 10c2382f87356ae9ea3fcb637d7edc5ed0e51e13cc2729c314c9ffb57c684b9ac3c4b757b85810c0a674020b7287c43d3be8273bcf75e2aff0cc1c037f1159f9
This commit is contained in:
@@ -710,7 +710,7 @@ void LegacyScriptPubKeyMan::UpdateTimeFirstKey(int64_t nCreateTime)
|
||||
// Cannot determine birthday information, so set the wallet birthday to
|
||||
// the beginning of time.
|
||||
nTimeFirstKey = 1;
|
||||
} else if (!nTimeFirstKey || nCreateTime < nTimeFirstKey) {
|
||||
} else if (nTimeFirstKey == UNKNOWN_TIME || nCreateTime < nTimeFirstKey) {
|
||||
nTimeFirstKey = nCreateTime;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user