aboutsummaryrefslogtreecommitdiff
path: root/src/bench/wallet_create_tx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bench/wallet_create_tx.cpp')
-rw-r--r--src/bench/wallet_create_tx.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bench/wallet_create_tx.cpp b/src/bench/wallet_create_tx.cpp
index 13b0019fd2..5e5bc76fd2 100644
--- a/src/bench/wallet_create_tx.cpp
+++ b/src/bench/wallet_create_tx.cpp
@@ -83,6 +83,8 @@ static void WalletCreateTx(benchmark::Bench& bench, const OutputType output_type
{
const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
+ // Set clock to genesis block, so the descriptors/keys creation time don't interfere with the blocks scanning process.
+ SetMockTime(test_setup->m_node.chainman->GetParams().GenesisBlock().nTime);
CWallet wallet{test_setup->m_node.chain.get(), "", CreateMockableWalletDatabase()};
{
LOCK(wallet.cs_wallet);
@@ -136,6 +138,8 @@ static void WalletCreateTx(benchmark::Bench& bench, const OutputType output_type
static void AvailableCoins(benchmark::Bench& bench, const std::vector<OutputType>& output_type)
{
const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
+ // Set clock to genesis block, so the descriptors/keys creation time don't interfere with the blocks scanning process.
+ SetMockTime(test_setup->m_node.chainman->GetParams().GenesisBlock().nTime);
CWallet wallet{test_setup->m_node.chain.get(), "", CreateMockableWalletDatabase()};
{
LOCK(wallet.cs_wallet);