aboutsummaryrefslogtreecommitdiff
path: root/src/node/transaction.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-01-27 22:18:52 +0000
committerJohn Newbery <john@johnnewbery.com>2021-03-04 10:22:57 +0000
commit680eb56d828ce358b4e000c140f5b247ff5e6179 (patch)
treec32f273b910fc8a3857107793889b2df0d62c5a1 /src/node/transaction.cpp
parenta38a4e8f039dfabfd9435f3a63f1a9b56de086d6 (diff)
[net processing] Don't pass CConnman to RelayTransactions
Use the local m_connman instead
Diffstat (limited to 'src/node/transaction.cpp')
-rw-r--r--src/node/transaction.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp
index b01381411a..a46446f317 100644
--- a/src/node/transaction.cpp
+++ b/src/node/transaction.cpp
@@ -29,9 +29,8 @@ static TransactionError HandleATMPError(const TxValidationState& state, std::str
TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef tx, std::string& err_string, const CAmount& max_tx_fee, bool relay, bool wait_callback)
{
// BroadcastTransaction can be called by either sendrawtransaction RPC or wallet RPCs.
- // node.connman is assigned both before chain clients and before RPC server is accepting calls,
- // and reset after chain clients and RPC sever are stopped. node.connman should never be null here.
- assert(node.connman);
+ // node.peerman is assigned both before chain clients and before RPC server is accepting calls,
+ // and reset after chain clients and RPC sever are stopped. node.peerman should never be null here.
assert(node.peerman);
assert(node.mempool);
std::promise<void> promise;
@@ -101,7 +100,7 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t
node.mempool->AddUnbroadcastTx(hashTx);
LOCK(cs_main);
- node.peerman->RelayTransaction(hashTx, tx->GetWitnessHash(), *node.connman);
+ node.peerman->RelayTransaction(hashTx, tx->GetWitnessHash());
}
return TransactionError::OK;