diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-05-16 18:35:35 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-07-10 10:50:50 -0300 |
commit | ca91c244ef1ba7eac6643d66a5fc56d3a2a8b550 (patch) | |
tree | 425fd02022aac33a86087392dd201b5d9f1836cc /src/test/util | |
parent | fcbdaeef4d5a63e3e5b479c6fcad730eb86fb923 (diff) |
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.cpp | 1 |
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() |