aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2018-08-27 07:28:17 -0400
committerMarcoFalke <[email protected]>2018-08-27 07:28:38 -0400
commit666749046663c7e3156336417231be6461b70577 (patch)
tree7a3636b11405e9b1090a5af2bbc83b818f94bf21 /src
parentMerge #13861: test: Add testing of value_ret for SelectCoinsBnB (diff)
parentReport minfeefilter value in getpeerinfo rpc (diff)
downloaddiscoin-666749046663c7e3156336417231be6461b70577.tar.xz
discoin-666749046663c7e3156336417231be6461b70577.zip
Merge #13987: Report minfeefilter value in getpeerinfo rpc
5778bf95d9 Report minfeefilter value in getpeerinfo rpc (Anthony Towns) Pull request description: Lowering the minimum relay fee is only useful when many nodes in the p2p network also lower the fee, so to make it easier to understand progress on that front, this includes the value of the minfeefilter in getpeerinfo, so you at least have visibility to what fees your neighbours are currently accepting. Tree-SHA512: 059f01bf2a32c98fce1648a13b7898701203b354d0209ee34e6683994b720eb594cf24968e66b699caae5e17e53d351e73281f042dd094decde14d3a318e9fb3
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp1
-rw-r--r--src/net.h1
-rw-r--r--src/rpc/net.cpp2
3 files changed, 4 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index ec4fa6c26..df2cb54b7 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -715,6 +715,7 @@ void CNode::copyStats(CNodeStats &stats)
X(nRecvBytes);
}
X(fWhitelisted);
+ X(minFeeFilter);
// It is common for nodes with good ping times to suddenly become lagged,
// due to a new block arriving or other large transfer.
diff --git a/src/net.h b/src/net.h
index f9cfea59b..edd2f8cf0 100644
--- a/src/net.h
+++ b/src/net.h
@@ -558,6 +558,7 @@ public:
double dPingTime;
double dPingWait;
double dMinPing;
+ CAmount minFeeFilter;
// Our address, as reported by the peer
std::string addrLocal;
// Address of this peer
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 610a1fee6..343b7d3b0 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -102,6 +102,7 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
" ...\n"
" ],\n"
" \"whitelisted\": true|false, (boolean) Whether the peer is whitelisted\n"
+ " \"minfeefilter\": n, (numeric) The minimum fee rate for transactions this peer accepts\n"
" \"bytessent_per_msg\": {\n"
" \"addr\": n, (numeric) The total bytes sent aggregated by message type\n"
" ...\n"
@@ -169,6 +170,7 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
obj.pushKV("inflight", heights);
}
obj.pushKV("whitelisted", stats.fWhitelisted);
+ obj.pushKV("minfeefilter", ValueFromAmount(stats.minFeeFilter));
UniValue sendPerMsgCmd(UniValue::VOBJ);
for (const mapMsgCmdSize::value_type &i : stats.mapSendBytesPerMsgCmd) {