Skip to content

Commit baf4efe

Browse files
committed
rpc: use enum instead of string for filter type
1 parent 0dd3477 commit baf4efe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@ static RPCHelpMan getblockfilter()
21772177
"\nRetrieve a BIP 157 content filter for a particular block.\n",
21782178
{
21792179
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hash of the block"},
2180-
{"filtertype", RPCArg::Type::STR, RPCArg::Default{"basic"}, "The type name of the filter"},
2180+
{"filtertype", RPCArg::Type::STR, RPCArg::Default{BlockFilterTypeName(BlockFilterType::BASIC)}, "The type name of the filter"},
21812181
},
21822182
RPCResult{
21832183
RPCResult::Type::OBJ, "", "",
@@ -2192,7 +2192,7 @@ static RPCHelpMan getblockfilter()
21922192
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
21932193
{
21942194
uint256 block_hash = ParseHashV(request.params[0], "blockhash");
2195-
std::string filtertype_name = "basic";
2195+
std::string filtertype_name = BlockFilterTypeName(BlockFilterType::BASIC);
21962196
if (!request.params[1].isNull()) {
21972197
filtertype_name = request.params[1].get_str();
21982198
}

0 commit comments

Comments
 (0)