diff options
author | Antoine Riard <ariard@student.42.fr> | 2019-07-30 18:08:03 -0400 |
---|---|---|
committer | Antoine Riard <ariard@student.42.fr> | 2019-08-08 22:57:35 -0400 |
commit | b7b9f6e4cee262004643e2fe03d56cb47fdbf5c2 (patch) | |
tree | 2f568f5e17b75577645a2b00159baed7c9833651 /src/node | |
parent | e5fdda68c6d2313edb74443f0d1e6d2ce2d97f5e (diff) |
Remove p2pEnabled from Chain interface
RPC server starts in warmup mode, it can't
process yet calls, then follows connection manager
initialization and finally RPC server get out of
warmup mode. RPC calls shouldn't be able to get
P2P disabled errors because once we initialize
g_connman it's not unset until shutdown, after
RPC server has been stopped.
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/transaction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp index 8e56496358..a28136a8e8 100644 --- a/src/node/transaction.cpp +++ b/src/node/transaction.cpp @@ -16,6 +16,9 @@ TransactionError BroadcastTransaction(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. + // g_connman is assigned both before chain clients and before RPC server is accepting calls, + // and reset after chain clients and RPC sever are stopped. g_connman should never be null here. assert(g_connman); std::promise<void> promise; uint256 hashTx = tx->GetHash(); |