aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-10 07:29:03 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-10 07:29:12 +0100
commitf5b2ea3e591822c9cb132106f47a209f88c605d1 (patch)
treecb8e3ea312ecced0c17b89fd845f494a8a68877a /src/rpc
parent054710615c5e96b24046ddd9a3c58f601419d35b (diff)
parent34e33ab8592d757b3acfe812c20d235029bbc319 (diff)
Merge #20217: net: Remove g_relay_txes
34e33ab8592d757b3acfe812c20d235029bbc319 Remove g_relay_txes (John Newbery) 68334b39443b3cfd75b0ef815ac40074185386f2 [net processing] Add m_ignores_incoming_txs to PeerManager and use internally (John Newbery) 4d510aa055064df5a10c2cc7888baffc3e6bc0e6 [init] Use MakeUnique<> to construct peerman (John Newbery) f3f61d0eb937ada5fd00d7d590f5f29325f7f414 [net processing] Add IgnoresIncomingTxs() function to PeerManager (John Newbery) 5805b8299f8f4943114de53c4dc09fc2dd9e270b [net processing] Move PushNodeVersion into PeerManager (John Newbery) Pull request description: `g_relay_txes` is only required inside net_processing and is set only once at startup. Instead of having a global, move it to be a const member of PeerManager. This requires moving `PushNodeVersion()` into `PeerManager`, which also allows us to remove the `connman` argument. ACKs for top commit: narula: utACK 34e33ab8592d757b3acfe812c20d235029bbc319 MarcoFalke: re-ACK 34e33ab85 💐 Tree-SHA512: 33f75b522e5f34b243731932eb96cd6c8ce9db69b5186395e3718858bc715cec1711a663c6afc5880462812cbc15040930e2dc648b2acad6bc6502ad1397c5e3
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/net.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index fa71ea1181..19e717f0af 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -578,7 +578,9 @@ static RPCHelpMan getnetworkinfo()
obj.pushKV("localservices", strprintf("%016x", services));
obj.pushKV("localservicesnames", GetServicesNames(services));
}
- obj.pushKV("localrelay", g_relay_txes);
+ if (node.peerman) {
+ obj.pushKV("localrelay", !node.peerman->IgnoresIncomingTxs());
+ }
obj.pushKV("timeoffset", GetTimeOffset());
if (node.connman) {
obj.pushKV("networkactive", node.connman->GetNetworkActive());