diff --git a/src/coinjoin/server.cpp b/src/coinjoin/server.cpp index 50c256665b12dc..3c3e312a777362 100644 --- a/src/coinjoin/server.cpp +++ b/src/coinjoin/server.cpp @@ -349,7 +349,7 @@ void CCoinJoinServer::CommitFinalTransaction() LogPrint(BCLog::COINJOIN, "CCoinJoinServer::CommitFinalTransaction -- TRANSMITTING DSTX\n"); CInv inv(MSG_DSTX, hashTx); - m_peerman->RelayInv(inv); + Assert(m_peerman)->RelayInv(inv); // Tell the clients it was successful RelayCompletedTransaction(MSG_SUCCESS); @@ -460,7 +460,7 @@ void CCoinJoinServer::ConsumeCollateral(const CTransactionRef& txref) const if (!ATMPIfSaneFee(m_chainstate, mempool, txref, false /* bypass_limits */)) { LogPrint(BCLog::COINJOIN, "%s -- AcceptToMemoryPool failed\n", __func__); } else { - m_peerman->RelayTransaction(txref->GetHash()); + Assert(m_peerman)->RelayTransaction(txref->GetHash()); LogPrint(BCLog::COINJOIN, "%s -- Collateral was consumed\n", __func__); } } diff --git a/src/llmq/blockprocessor.cpp b/src/llmq/blockprocessor.cpp index 0604ec747527b8..f3c6c9f9709bbc 100644 --- a/src/llmq/blockprocessor.cpp +++ b/src/llmq/blockprocessor.cpp @@ -668,7 +668,7 @@ void CQuorumBlockProcessor::AddMineableCommitment(const CFinalCommitment& fqc) // We only relay the new commitment if it's new or better then the old one if (relay) { CInv inv(MSG_QUORUM_FINAL_COMMITMENT, commitmentHash); - m_peerman->RelayInv(inv); + Assert(m_peerman)->RelayInv(inv); } } diff --git a/src/llmq/chainlocks.cpp b/src/llmq/chainlocks.cpp index a22a8dc44f8c64..72a0771a3ae7da 100644 --- a/src/llmq/chainlocks.cpp +++ b/src/llmq/chainlocks.cpp @@ -162,7 +162,7 @@ PeerMsgRet CChainLocksHandler::ProcessNewChainLock(const NodeId from, const llmq // Note: do not hold cs while calling RelayInv AssertLockNotHeld(cs); - m_peerman->RelayInv(clsigInv); + Assert(m_peerman)->RelayInv(clsigInv); if (pindex == nullptr) { // we don't know the block/header for this CLSIG yet, so bail out for now diff --git a/src/llmq/ehf_signals.cpp b/src/llmq/ehf_signals.cpp index a07342f262c997..8c69d7fb4c5cbf 100644 --- a/src/llmq/ehf_signals.cpp +++ b/src/llmq/ehf_signals.cpp @@ -140,7 +140,7 @@ void CEHFSignalsHandler::HandleNewRecoveredSig(const CRecoveredSig& recoveredSig LOCK(cs_main); const MempoolAcceptResult result = AcceptToMemoryPool(chainstate, mempool, tx_to_sent, /* bypass_limits */ false); if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) { - m_peerman->RelayTransaction(tx_to_sent->GetHash()); + Assert(m_peerman)->RelayTransaction(tx_to_sent->GetHash()); } else { LogPrintf("CEHFSignalsHandler::HandleNewRecoveredSig -- AcceptToMemoryPool failed: %s\n", result.m_state.ToString()); } diff --git a/src/llmq/instantsend.cpp b/src/llmq/instantsend.cpp index 46bb829ab750dd..f558c9151549de 100644 --- a/src/llmq/instantsend.cpp +++ b/src/llmq/instantsend.cpp @@ -951,7 +951,7 @@ std::unordered_set CInstantSendManager::ProcessPend for (const auto& nodeId : batchVerifier.badSources) { // Let's not be too harsh, as the peer might simply be unlucky and might have sent us an old lock which // does not validate anymore due to changed quorums - m_peerman->Misbehaving(nodeId, 20); + Assert(m_peerman)->Misbehaving(nodeId, 20); } } for (const auto& p : pend) { @@ -1045,11 +1045,11 @@ void CInstantSendManager::ProcessInstantSendLock(NodeId from, const uint256& has CInv inv(MSG_ISDLOCK, hash); if (tx != nullptr) { - m_peerman->RelayInvFiltered(inv, *tx, ISDLOCK_PROTO_VERSION); + Assert(m_peerman)->RelayInvFiltered(inv, *tx, ISDLOCK_PROTO_VERSION); } else { // we don't have the TX yet, so we only filter based on txid. Later when that TX arrives, we will re-announce // with the TX taken into account. - m_peerman->RelayInvFiltered(inv, islock->txid, ISDLOCK_PROTO_VERSION); + Assert(m_peerman)->RelayInvFiltered(inv, islock->txid, ISDLOCK_PROTO_VERSION); } ResolveBlockConflicts(hash, *islock); diff --git a/src/llmq/signing_shares.cpp b/src/llmq/signing_shares.cpp index 50cb75e8321c03..fb8541fd32768f 100644 --- a/src/llmq/signing_shares.cpp +++ b/src/llmq/signing_shares.cpp @@ -1394,7 +1394,7 @@ void CSigSharesManager::RemoveBannedNodeStates() LOCK(cs); for (auto it = nodeStates.begin(); it != nodeStates.end();) { - if (m_peerman->IsBanned(it->first)) { + if (Assert(m_peerman)->IsBanned(it->first)) { // re-request sigshares from other nodes it->second.requestedSigShares.ForEach([this](const SigShareKey& k, int64_t) { AssertLockHeld(cs); @@ -1414,7 +1414,7 @@ void CSigSharesManager::BanNode(NodeId nodeId) } { - m_peerman->Misbehaving(nodeId, 100); + Assert(m_peerman)->Misbehaving(nodeId, 100); } LOCK(cs);