| 3582 | } |
| 3583 | |
| 3584 | void PeerManagerImpl::PushPrivateBroadcastTx(CNode& node) |
| 3585 | { |
| 3586 | Assume(node.IsPrivateBroadcastConn()); |
| 3587 | |
| 3588 | const auto opt_tx{m_tx_for_private_broadcast.PickTxForSend(node.GetId(), CService{node.addr})}; |
| 3589 | if (!opt_tx) { |
| 3590 | LogDebug(BCLog::PRIVBROADCAST, "Disconnecting: no more transactions for private broadcast (connected in vain), %s", node.LogPeer()); |
| 3591 | node.fDisconnect = true; |
| 3592 | return; |
| 3593 | } |
| 3594 | const CTransactionRef& tx{*opt_tx}; |
| 3595 | |
| 3596 | LogDebug(BCLog::PRIVBROADCAST, "P2P handshake completed, sending INV for txid=%s%s, %s", |
| 3597 | tx->GetHash().ToString(), tx->HasWitness() ? strprintf(", wtxid=%s", tx->GetWitnessHash().ToString()) : "", |
| 3598 | node.LogPeer()); |
| 3599 | |
| 3600 | MakeAndPushMessage(node, NetMsgType::INV, std::vector<CInv>{{CInv{MSG_TX, tx->GetHash().ToUint256()}}}); |
| 3601 | } |
| 3602 | |
| 3603 | void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string& msg_type, DataStream& vRecv, |
| 3604 | const NodeClock::time_point time_received, |
nothing calls this directly
no test coverage detected