File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -715,6 +715,7 @@ void CNode::copyStats(CNodeStats &stats)
715
715
X (nRecvBytes);
716
716
}
717
717
X (fWhitelisted );
718
+ X (minFeeFilter);
718
719
719
720
// It is common for nodes with good ping times to suddenly become lagged,
720
721
// due to a new block arriving or other large transfer.
Original file line number Diff line number Diff line change @@ -558,6 +558,7 @@ class CNodeStats
558
558
double dPingTime;
559
559
double dPingWait;
560
560
double dMinPing;
561
+ CAmount minFeeFilter;
561
562
// Our address, as reported by the peer
562
563
std::string addrLocal;
563
564
// Address of this peer
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
102
102
" ...\n "
103
103
" ],\n "
104
104
" \" whitelisted\" : true|false, (boolean) Whether the peer is whitelisted\n "
105
+ " \" minfeefilter\" : n, (numeric) The minimum fee rate for transactions this peer accepts\n "
105
106
" \" bytessent_per_msg\" : {\n "
106
107
" \" addr\" : n, (numeric) The total bytes sent aggregated by message type\n "
107
108
" ...\n "
@@ -169,6 +170,7 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
169
170
obj.pushKV (" inflight" , heights);
170
171
}
171
172
obj.pushKV (" whitelisted" , stats.fWhitelisted );
173
+ obj.pushKV (" minfeefilter" , ValueFromAmount (stats.minFeeFilter ));
172
174
173
175
UniValue sendPerMsgCmd (UniValue::VOBJ);
174
176
for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd ) {
Original file line number Diff line number Diff line change 7
7
Tests correspond to code in rpc/net.cpp.
8
8
"""
9
9
10
+ from decimal import Decimal
11
+
10
12
from test_framework .test_framework import BitcoinTestFramework
11
13
from test_framework .util import (
12
14
assert_equal ,
@@ -21,6 +23,7 @@ class NetTest(BitcoinTestFramework):
21
23
def set_test_params (self ):
22
24
self .setup_clean_chain = True
23
25
self .num_nodes = 2
26
+ self .extra_args = [["-minrelaytxfee=0.00001000" ],["-minrelaytxfee=0.00000500" ]]
24
27
25
28
def run_test (self ):
26
29
self ._test_connection_count ()
@@ -95,6 +98,8 @@ def _test_getpeerinfo(self):
95
98
# the address bound to on one side will be the source address for the other node
96
99
assert_equal (peer_info [0 ][0 ]['addrbind' ], peer_info [1 ][0 ]['addr' ])
97
100
assert_equal (peer_info [1 ][0 ]['addrbind' ], peer_info [0 ][0 ]['addr' ])
101
+ assert_equal (peer_info [0 ][0 ]['minfeefilter' ], Decimal ("0.00000500" ))
102
+ assert_equal (peer_info [1 ][0 ]['minfeefilter' ], Decimal ("0.00001000" ))
98
103
99
104
if __name__ == '__main__' :
100
105
NetTest ().main ()
You can’t perform that action at this time.
0 commit comments