mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-17 11:07:00 +02:00
rpc: disallow boolean verbosity in getorphantxs
Updates ParseVerbosity() to support disallowing boolean verbosity. Removes boolean verbosity for getorphantxs to encourage integer verbosity usage
This commit is contained in:
@@ -854,7 +854,7 @@ static RPCHelpMan getorphantxs()
|
||||
"\nShows transactions in the tx orphanage.\n"
|
||||
"\nEXPERIMENTAL warning: this call may be changed in future releases.\n",
|
||||
{
|
||||
{"verbosity|verbose", RPCArg::Type::NUM, RPCArg::Default{0}, "0 for an array of txids (may contain duplicates), 1 for an array of objects with tx details, and 2 for details from (1) and tx hex",
|
||||
{"verbosity", RPCArg::Type::NUM, RPCArg::Default{0}, "0 for an array of txids (may contain duplicates), 1 for an array of objects with tx details, and 2 for details from (1) and tx hex",
|
||||
RPCArgOptions{.skip_type_check = true}},
|
||||
},
|
||||
{
|
||||
@@ -889,7 +889,7 @@ static RPCHelpMan getorphantxs()
|
||||
PeerManager& peerman = EnsurePeerman(node);
|
||||
std::vector<TxOrphanage::OrphanTxBase> orphanage = peerman.GetOrphanTransactions();
|
||||
|
||||
int verbosity{ParseVerbosity(request.params[0], /*default_verbosity=*/0)};
|
||||
int verbosity{ParseVerbosity(request.params[0], /*default_verbosity=*/0, /*allow_bool*/false)};
|
||||
|
||||
UniValue ret(UniValue::VARR);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user