MCPcopy Create free account
hub / github.com/ElementsProject/elements / _RelayTransaction

Method _RelayTransaction

src/net_processing.cpp:1727–1740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1725}
1726
1727void PeerManagerImpl::_RelayTransaction(const uint256& txid, const uint256& wtxid)
1728{
1729 m_connman.ForEachNode([&txid, &wtxid](CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(::cs_main) {
1730 AssertLockHeld(::cs_main);
1731
1732 CNodeState* state = State(pnode->GetId());
1733 if (state == nullptr) return;
1734 if (state->m_wtxid_relay) {
1735 pnode->PushTxInventory(wtxid);
1736 } else {
1737 pnode->PushTxInventory(txid);
1738 }
1739 });
1740}
1741
1742void PeerManagerImpl::RelayAddress(NodeId originator,
1743 const CAddress& addr,

Callers

nothing calls this directly

Calls 5

ForEachNodeMethod · 0.80
GetIdMethod · 0.80
PushTxInventoryMethod · 0.80
EXCLUSIVE_LOCKS_REQUIREDFunction · 0.70
StateEnum · 0.70

Tested by

no test coverage detected