Skip to content

Commit 5986970

Browse files
committed
Merge bitcoin/bitcoin#21818: doc: fixup -coinstatsindex help, update bitcoin.conf and files.md
54133c5 doc: add indexes/coinstats/db/ to files.md (Jon Atack) 5d1050f doc: fix -coinstatsindex help, and test/rpc touchups (Jon Atack) e041ee0 doc: add coinstatsindex to bitcoin.conf (Jon Atack) Pull request description: ACKs for top commit: Sjors: utACK 54133c5 MarcoFalke: cr ACK 54133c5 clarkmoody: utACK 54133c5 Tree-SHA512: 1a7f3e89873b7dc79ec71d5d39e9e3e4977ce43cc4bee208ad55291bef1bb319a9d1c34ed84a87d6a803db983bdfd0af4d9f396cec0bec86b1701ebbb6f34378
2 parents f2865b7 + 54133c5 commit 5986970

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

doc/files.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Subdirectory | File(s) | Description
5353
`indexes/txindex/` | LevelDB database | Transaction index; *optional*, used if `-txindex=1`
5454
`indexes/blockfilter/basic/db/` | LevelDB database | Blockfilter index LevelDB database for the basic filtertype; *optional*, used if `-blockfilterindex=basic`
5555
`indexes/blockfilter/basic/` | `fltrNNNNN.dat`<sup>[\[2\]](#note2)</sup> | Blockfilter index filters for the basic filtertype; *optional*, used if `-blockfilterindex=basic`
56+
`indexes/coinstats/db/` | LevelDB database | Coinstats index; *optional*, used if `-coinstatsindex=1`
5657
`wallets/` | | [Contains wallets](#multi-wallet-environment); can be specified by `-walletdir` option; if `wallets/` subdirectory does not exist, wallets reside in the [data directory](#data-directory-location)
5758
`./` | `anchors.dat` | Anchor IP address database, created on shutdown and deleted at startup. Anchors are last known outgoing block-relay-only peers that are tried to re-connect to on startup
5859
`./` | `banlist.dat` | Stores the IPs/subnets of banned nodes

share/examples/bitcoin.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,11 @@
142142
# both prior transactions and several dozen future transactions.
143143
#keypool=100
144144

145+
# Maintain coinstats index used by the gettxoutsetinfo RPC (default: 0).
146+
#coinstatsindex=1
147+
145148
# Enable pruning to reduce storage requirements by deleting old blocks.
146-
# This mode is incompatible with -txindex and -rescan.
149+
# This mode is incompatible with -txindex, -coinstatsindex and -rescan.
147150
# 0 = default (no pruning).
148151
# 1 = allows manual pruning via RPC.
149152
# >=550 = target to stay under in MiB.

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void SetupServerArgs(NodeContext& node)
384384
#endif
385385
argsman.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
386386
argsman.AddArg("-blocksonly", strprintf("Whether to reject transactions from network peers. Automatic broadcast and rebroadcast of any transactions from inbound peers is disabled, unless the peer has the 'forcerelay' permission. RPC transactions are not affected. (default: %u)", DEFAULT_BLOCKSONLY), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
387-
argsman.AddArg("-coinstatsindex", strprintf("Maintain coinstats index used by the gettxoutset RPC (default: %u)", DEFAULT_COINSTATSINDEX), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
387+
argsman.AddArg("-coinstatsindex", strprintf("Maintain coinstats index used by the gettxoutsetinfo RPC (default: %u)", DEFAULT_COINSTATSINDEX), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
388388
argsman.AddArg("-conf=<file>", strprintf("Specify path to read-only configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
389389
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
390390
argsman.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ static RPCHelpMan gettxoutsetinfo()
10991099
"Note this call may take some time if you are not using coinstatsindex.\n",
11001100
{
11011101
{"hash_type", RPCArg::Type::STR, RPCArg::Default{"hash_serialized_2"}, "Which UTXO set hash should be calculated. Options: 'hash_serialized_2' (the legacy algorithm), 'muhash', 'none'."},
1102-
{"hash_or_height", RPCArg::Type::NUM, RPCArg::Optional::OMITTED, "The block hash or height of the target height (only available with coinstatsindex)", "", {"", "string or numeric"}},
1102+
{"hash_or_height", RPCArg::Type::NUM, RPCArg::Optional::OMITTED, "The block hash or height of the target height (only available with coinstatsindex).", "", {"", "string or numeric"}},
11031103
{"use_index", RPCArg::Type::BOOL, RPCArg::Default{true}, "Use coinstatsindex, if available."},
11041104
},
11051105
RPCResult{

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def _test_gettxoutsetinfo(self):
275275
assert 'muhash' in res6
276276
assert(res['hash_serialized_2'] != res6['muhash'])
277277

278-
# muhash should not be included in gettxoutset unless requested.
278+
# muhash should not be returned unless requested.
279279
for r in [res, res2, res3, res4, res5]:
280280
assert 'muhash' not in r
281281

0 commit comments

Comments
 (0)