Skip to content

Commit 825d198

Browse files
committed
Index: Allow coinstatsindex with pruning enabled
1 parent f08c9fb commit 825d198

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/init.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ void SetupServerArgs(ArgsManager& argsman)
421421
-GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
422422
argsman.AddArg("-persistmempool", strprintf("Whether to save the mempool on shutdown and load on restart (default: %u)", DEFAULT_PERSIST_MEMPOOL), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
423423
argsman.AddArg("-pid=<file>", strprintf("Specify pid file. Relative paths will be prefixed by a net-specific datadir location. (default: %s)", BITCOIN_PID_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
424-
argsman.AddArg("-prune=<n>", strprintf("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -coinstatsindex. "
424+
argsman.AddArg("-prune=<n>", strprintf("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex. "
425425
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
426426
"(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >=%u = automatically prune block files to stay under the specified target size in MiB)", MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
427427
argsman.AddArg("-reindex", "Rebuild chain state and block index from the blk*.dat files on disk", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
@@ -858,8 +858,6 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
858858
if (args.GetIntArg("-prune", 0)) {
859859
if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX))
860860
return InitError(_("Prune mode is incompatible with -txindex."));
861-
if (args.GetBoolArg("-coinstatsindex", DEFAULT_COINSTATSINDEX))
862-
return InitError(_("Prune mode is incompatible with -coinstatsindex."));
863861
if (args.GetBoolArg("-reindex-chainstate", false)) {
864862
return InitError(_("Prune mode is incompatible with -reindex-chainstate. Use full -reindex instead."));
865863
}

test/functional/feature_pruning.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ def test_invalid_command_line_options(self):
137137
expected_msg='Error: Prune mode is incompatible with -txindex.',
138138
extra_args=['-prune=550', '-txindex'],
139139
)
140-
self.nodes[0].assert_start_raises_init_error(
141-
expected_msg='Error: Prune mode is incompatible with -coinstatsindex.',
142-
extra_args=['-prune=550', '-coinstatsindex'],
143-
)
144140
self.nodes[0].assert_start_raises_init_error(
145141
expected_msg='Error: Prune mode is incompatible with -reindex-chainstate. Use full -reindex instead.',
146142
extra_args=['-prune=550', '-reindex-chainstate'],

0 commit comments

Comments
 (0)