aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-09-17 18:28:03 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-10-28 10:30:51 -0400
commite6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d (patch)
tree1c12f814ae2ac88316066d334274354c669d7aa5 /src/rpc
parent4d5448c76b71c9d91399c31b043237091be2e5e7 (diff)
downloadbitcoin-e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d.tar.xz
Pass NodeContext, ConnMan, BanMan references more places
So g_connman and g_banman globals can be removed next commit.
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/mining.cpp1
-rw-r--r--src/rpc/net.cpp1
-rw-r--r--src/rpc/rawtransaction.cpp4
3 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 07c2958635..f616b83030 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -13,6 +13,7 @@
#include <key_io.h>
#include <miner.h>
#include <net.h>
+#include <node/context.h>
#include <policy/fees.h>
#include <pow.h>
#include <rpc/blockchain.h>
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 7b1507e4dc..604846eeef 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -11,6 +11,7 @@
#include <net_processing.h>
#include <net_permissions.h>
#include <netbase.h>
+#include <node/context.h>
#include <policy/settings.h>
#include <rpc/protocol.h>
#include <rpc/util.h>
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index cdcf0c9971..9b71b70b22 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -10,7 +10,9 @@
#include <index/txindex.h>
#include <key_io.h>
#include <merkleblock.h>
+#include <net.h>
#include <node/coin.h>
+#include <node/context.h>
#include <node/psbt.h>
#include <node/transaction.h>
#include <policy/policy.h>
@@ -817,7 +819,7 @@ static UniValue sendrawtransaction(const JSONRPCRequest& request)
std::string err_string;
AssertLockNotHeld(cs_main);
- const TransactionError err = BroadcastTransaction(tx, err_string, max_raw_tx_fee, /*relay*/ true, /*wait_callback*/ true);
+ const TransactionError err = BroadcastTransaction(*g_rpc_node, tx, err_string, max_raw_tx_fee, /*relay*/ true, /*wait_callback*/ true);
if (TransactionError::OK != err) {
throw JSONRPCTransactionError(err, err_string);
}