aboutsummaryrefslogtreecommitdiff
path: root/src/bench/readblock.cpp
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2024-04-26 15:06:55 -0400
committerMartin Zumsande <mzumsande@gmail.com>2024-05-14 14:54:27 -0400
commitd9e477c4dc39d9623ed66c35c06e28f94ae62ad5 (patch)
treeffdf694d028624320b245aa3745414f9771529b2 /src/bench/readblock.cpp
parent064859bbad6984a6ec85c744064abdf757807c58 (diff)
downloadbitcoin-d9e477c4dc39d9623ed66c35c06e28f94ae62ad5.tar.xz
validation, blockstorage: Separate code paths for reindex and saving new blocks
By calling SaveBlockToDisk only when we actually want to save a new block to disk. In the reindex case, we now call UpdateBlockInfo directly from validation. This commit doesn't change behavior.
Diffstat (limited to 'src/bench/readblock.cpp')
-rw-r--r--src/bench/readblock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bench/readblock.cpp b/src/bench/readblock.cpp
index 0545c6b017..2b2bfe069e 100644
--- a/src/bench/readblock.cpp
+++ b/src/bench/readblock.cpp
@@ -18,7 +18,7 @@ static FlatFilePos WriteBlockToDisk(ChainstateManager& chainman)
CBlock block;
stream >> TX_WITH_WITNESS(block);
- return chainman.m_blockman.SaveBlockToDisk(block, 0, nullptr);
+ return chainman.m_blockman.SaveBlockToDisk(block, 0);
}
static void ReadBlockFromDiskTest(benchmark::Bench& bench)