aboutsummaryrefslogtreecommitdiff
path: root/src/node/context.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-09-17 18:59:36 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-10-28 10:30:51 -0400
commit8922d7f6b751a3e6b3b9f6fb7961c442877fb65a (patch)
tree287fa005931505e5cc231e231b10a9cb4b85a9b9 /src/node/context.cpp
parente6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d (diff)
scripted-diff: Remove g_connman, g_banman globals
-BEGIN VERIFY SCRIPT- sed -i 's:#include <interfaces/chain.h>:#include <banman.h>\n#include <interfaces/chain.h>\n#include <net.h>\n#include <net_processing.h>:' src/node/context.cpp sed -i 's/namespace interfaces {/class BanMan;\nclass CConnman;\nclass PeerLogicValidation;\n&/' src/node/context.h sed -i 's/std::unique_ptr<interfaces::Chain> chain/std::unique_ptr<CConnman> connman;\n std::unique_ptr<PeerLogicValidation> peer_logic;\n std::unique_ptr<BanMan> banman;\n &/' src/node/context.h sed -i '/std::unique_ptr<[^>]\+> \(g_connman\|g_banman\|peerLogic\);/d' src/banman.h src/net.h src/init.cpp sed -i 's/g_connman/m_context.connman/g' src/interfaces/node.cpp sed -i 's/g_banman/m_context.banman/g' src/interfaces/node.cpp sed -i 's/g_connman/m_node.connman/g' src/interfaces/chain.cpp src/test/setup_common.cpp sed -i 's/g_banman/m_node.banman/g' src/test/setup_common.cpp sed -i 's/g_connman/node.connman/g' src/init.cpp src/node/transaction.cpp sed -i 's/g_banman/node.banman/g' src/init.cpp sed -i 's/peerLogic/node.peer_logic/g' src/init.cpp sed -i 's/g_connman/g_rpc_node->connman/g' src/rpc/mining.cpp src/rpc/net.cpp src/rpc/rawtransaction.cpp sed -i 's/g_banman/g_rpc_node->banman/g' src/rpc/net.cpp sed -i 's/std::shared_ptr<CWallet> wallet =/node.context()->connman = std::move(test.m_node.connman);\n &/' src/qt/test/wallettests.cpp -END VERIFY SCRIPT-
Diffstat (limited to 'src/node/context.cpp')
-rw-r--r--src/node/context.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node/context.cpp b/src/node/context.cpp
index 98cb061f19..26a01420c8 100644
--- a/src/node/context.cpp
+++ b/src/node/context.cpp
@@ -4,7 +4,10 @@
#include <node/context.h>
+#include <banman.h>
#include <interfaces/chain.h>
+#include <net.h>
+#include <net_processing.h>
NodeContext::NodeContext() {}
NodeContext::~NodeContext() {}