aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-05-16 18:35:35 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-07-10 10:50:50 -0300
commitca91c244ef1ba7eac6643d66a5fc56d3a2a8b550 (patch)
tree425fd02022aac33a86087392dd201b5d9f1836cc /src/test/util
parentfcbdaeef4d5a63e3e5b479c6fcad730eb86fb923 (diff)
downloadbitcoin-ca91c244ef1ba7eac6643d66a5fc56d3a2a8b550.tar.xz
index: verify blocks data existence only once
At present, during init, we traverse the chain (once per index) to confirm that all necessary blocks to sync each index up to the current tip are present. To make the process more efficient, we can fetch the oldest block from the indexers and perform the chain data existence check from that point only once. This also moves the pruning violation check to the end of the 'loadinit' thread, which is where the reindex, block loading and chain activation processes happen. Making the node's startup process faster, allowing us to remove the global g_indexes_ready_to_sync flag, and enabling the execution of the pruning violation verification even when the reindex or reindex-chainstate flags are enabled (which has being skipped so far).
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 3e2f0ab88d..d8f30bdc6e 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -157,7 +157,6 @@ BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vecto
noui_connect();
noui_connected = true;
}
- node::g_indexes_ready_to_sync = true;
}
BasicTestingSetup::~BasicTestingSetup()