Skip to content

Commit eb8735b

Browse files
committed
Reduce the number of untrimmed headers in memory, since they can be untrimmed on demand now
1 parent bf5a50f commit eb8735b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
993993
// back to current epoch start, and then an additional total_valid_epochs on top of that.
994994
// We add one epoch here for the current partial epoch, and then another one for good luck.
995995

996-
nMustKeepFullHeaders = (chainparams.GetConsensus().total_valid_epochs + 2) * epoch_length;
996+
nMustKeepFullHeaders = chainparams.GetConsensus().total_valid_epochs * epoch_length;
997997
// This is the number of headers we can have in flight downloading at a time, beyond the
998998
// set of blocks we've already validated. Capping this is necessary to keep memory usage
999999
// bounded during IBD.

0 commit comments

Comments
 (0)