aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw0xlt <94266259+w0xlt@users.noreply.github.com>2022-06-27 14:33:10 -0300
committerw0xlt <94266259+w0xlt@users.noreply.github.com>2022-06-27 14:33:10 -0300
commitbaf4efe02f363b70011b04cadd2d7aace18d48e9 (patch)
tree7206db286959f3c178b9d46e93bbfa77cb1621fb /src
parent0dd34773334c7f4db7b05df30ee61b011795b46d (diff)
downloadbitcoin-baf4efe02f363b70011b04cadd2d7aace18d48e9.tar.xz
rpc: use enum instead of string for filter type
Diffstat (limited to 'src')
-rw-r--r--src/rpc/blockchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 9766a237c7..af9458206e 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -2177,7 +2177,7 @@ static RPCHelpMan getblockfilter()
"\nRetrieve a BIP 157 content filter for a particular block.\n",
{
{"blockhash", RPCArg::Type::STR_HEX, 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)}, "The type name of the filter"},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
@@ -2192,7 +2192,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);
if (!request.params[1].isNull()) {
filtertype_name = request.params[1].get_str();
}