validation: pass ChainstateRole for validationinterface calls

This allows consumers to decide how to handle events from background or
assumedvalid chainstates.
This commit is contained in:
James O'Beirne authored and James O'Beirne committed 2023-09-30 06:38:47 -04:00
1 parent 1e59acdf17
commit 4d8f4dcb45
19 files changed
+66 -42

No files matched your search

+3 -2
View File
@@ -2,6 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <kernel/chain.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
@@ -145,8 +146,8 @@ FUZZ_TARGET(wallet_notifications, .init = initialize_setup)
// 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);
a.wallet->blockConnected(ChainstateRole::NORMAL, info);
b.wallet->blockConnected(ChainstateRole::NORMAL, info);
// Store the coins for the next block
Coins coins_new;
for (const auto& tx : block.vtx) {