mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
fuzz: fix wallet notifications.cpp
As the fuzzer test requires all blocks to be scanned by the wallet (because it is asserting the wallet balance at the end), we need to ensure that no blocks are skipped by the recently added wallet birth time functionality. This just means setting the chain accumulated time to the maximum value, so the wallet birth time is always below it, and the block is always processed.
This commit is contained in:
parent
71300489af
commit
a10f032115
1 changed files with 4 additions and 0 deletions
|
@ -141,6 +141,10 @@ FUZZ_TARGET_INIT(wallet_notifications, initialize_setup)
|
|||
info.prev_hash = &block.hashPrevBlock;
|
||||
info.height = chain.size();
|
||||
info.data = █
|
||||
// Ensure that no blocks are skipped by the wallet by setting the chain's accumulated
|
||||
// time to the maximum value. This ensures that the wallet's birth time is always
|
||||
// earlier than this maximum time.
|
||||
info.chain_time_max = std::numeric_limits<unsigned int>::max();
|
||||
a.wallet->blockConnected(info);
|
||||
b.wallet->blockConnected(info);
|
||||
// Store the coins for the next block
|
||||
|
|
Loading…
Add table
Reference in a new issue