Skip to content

Commit 1f44854

Browse files
committed
Always return getpeerinfo "minfeefilter" field (for v24 backport)
with its pre-existing v23 default value of 0.
1 parent 9cd6682 commit 1f44854

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/rpc/net.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static RPCHelpMan getpeerinfo()
146146
{
147147
{RPCResult::Type::STR, "permission_type", Join(NET_PERMISSIONS_DOC, ",\n") + ".\n"},
148148
}},
149-
{RPCResult::Type::NUM, "minfeefilter", /*optional=*/true, "The minimum fee rate for transactions this peer accepts"},
149+
{RPCResult::Type::NUM, "minfeefilter", "The minimum fee rate for transactions this peer accepts"},
150150
{RPCResult::Type::OBJ_DYN, "bytessent_per_msg", "",
151151
{
152152
{RPCResult::Type::NUM, "msg", "The total bytes sent aggregated by message type\n"
@@ -247,9 +247,7 @@ static RPCHelpMan getpeerinfo()
247247
permissions.push_back(permission);
248248
}
249249
obj.pushKV("permissions", permissions);
250-
if (fStateStats) {
251-
obj.pushKV("minfeefilter", ValueFromAmount(statestats.m_fee_filter_received));
252-
}
250+
obj.pushKV("minfeefilter", fStateStats ? ValueFromAmount(statestats.m_fee_filter_received) : 0);
253251

254252
UniValue sendPerMsgType(UniValue::VOBJ);
255253
for (const auto& i : stats.mapSendBytesPerMsgType) {

0 commit comments

Comments
 (0)