Skip to content

Commit

Permalink
merge bitcoin#25485: Use enum instead of string for filtertype_name
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Oct 25, 2024
1 parent 1c1fcc6 commit 7068abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, "", "",
Expand All @@ -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();
}
Expand Down

0 comments on commit 7068abd

Please sign in to comment.