mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Add debug startup parameter -fastprune for more effective pruning tests
This commit is contained in:
parent
5e112269c3
commit
c286a22f7b
3 changed files with 4 additions and 3 deletions
|
|
@ -3212,7 +3212,7 @@ static bool FindBlockPos(FlatFilePos &pos, unsigned int nAddSize, unsigned int n
|
|||
|
||||
bool finalize_undo = false;
|
||||
if (!fKnown) {
|
||||
while (vinfoBlockFile[nFile].nSize + nAddSize >= MAX_BLOCKFILE_SIZE) {
|
||||
while (vinfoBlockFile[nFile].nSize + nAddSize >= (gArgs.GetBoolArg("-fastprune", false) ? 0x10000 /* 64kb */ : MAX_BLOCKFILE_SIZE)) {
|
||||
// when the undo file is keeping up with the block file, we want to flush it explicitly
|
||||
// when it is lagging behind (more blocks arrive than are being connected), we let the
|
||||
// undo block write case handle it
|
||||
|
|
@ -4004,7 +4004,7 @@ void BlockManager::FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPr
|
|||
|
||||
static FlatFileSeq BlockFileSeq()
|
||||
{
|
||||
return FlatFileSeq(GetBlocksDir(), "blk", BLOCKFILE_CHUNK_SIZE);
|
||||
return FlatFileSeq(GetBlocksDir(), "blk", gArgs.GetBoolArg("-fastprune", false) ? 0x4000 /* 16kb */ : BLOCKFILE_CHUNK_SIZE);
|
||||
}
|
||||
|
||||
static FlatFileSeq UndoFileSeq()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue