aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-07-28 22:50:07 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-02-22 15:43:02 -0400
commit00dfb2a440b94a24b61cafb519fb122f6a0ae176 (patch)
tree203e03944bd1a1975671bf2faa0f16b6cf0d22eb /src/wallet
parentcc3836e8f90894432db06d9de6b20eac53d93cbe (diff)
downloadbitcoin-00dfb2a440b94a24b61cafb519fb122f6a0ae176.tar.xz
Remove uses of g_connman in wallet code
This commit does not change behavior.
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 09e91dc588..6e11fe936c 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -318,7 +318,7 @@ static CTransactionRef SendMoney(interfaces::Chain::Lock& locked_chain, CWallet
if (nValue > curBalance)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
- if (pwallet->GetBroadcastTransactions() && !g_connman) {
+ if (pwallet->GetBroadcastTransactions() && !pwallet->chain().p2pEnabled()) {
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
}
@@ -858,7 +858,7 @@ static UniValue sendmany(const JSONRPCRequest& request)
auto locked_chain = pwallet->chain().lock();
LOCK(pwallet->cs_wallet);
- if (pwallet->GetBroadcastTransactions() && !g_connman) {
+ if (pwallet->GetBroadcastTransactions() && !pwallet->chain().p2pEnabled()) {
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
}
@@ -2690,7 +2690,7 @@ static UniValue resendwallettransactions(const JSONRPCRequest& request)
}.ToString()
);
- if (!g_connman)
+ if (!pwallet->chain().p2pEnabled())
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
auto locked_chain = pwallet->chain().lock();