mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin#25485: Use enum instead of string for filtertype_name
This commit is contained in:
parent
1c1fcc60a8
commit
7068abd796
@ -2905,7 +2905,7 @@ static RPCHelpMan getblockfilter()
|
||||
"\nRetrieve a BIP 157 content filter for a particular block.\n",
|
||||
{
|
||||
{"blockhash", RPCArg::Type::STR, RPCArg::Optional::NO, "The hash of the block"},
|
||||
{"filtertype", RPCArg::Type::STR, RPCArg::Default{"basic"}, "The type name of the filter"},
|
||||
{"filtertype", RPCArg::Type::STR, RPCArg::Default{BlockFilterTypeName(BlockFilterType::BASIC_FILTER)}, "The type name of the filter"},
|
||||
},
|
||||
RPCResult{
|
||||
RPCResult::Type::OBJ, "", "",
|
||||
@ -2920,7 +2920,7 @@ static RPCHelpMan getblockfilter()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
uint256 block_hash(ParseHashV(request.params[0], "blockhash"));
|
||||
std::string filtertype_name = "basic";
|
||||
std::string filtertype_name = BlockFilterTypeName(BlockFilterType::BASIC_FILTER);
|
||||
if (!request.params[1].isNull()) {
|
||||
filtertype_name = request.params[1].get_str();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user