Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,13 @@ static void PushInv(Peer& peer, const CInv& inv)
return;
}

// Skip ISDLOCK inv announcements for peers that want recsigs, as they can reconstruct
// the islock from the recsig
if (inv.type == MSG_ISDLOCK && peer.m_wants_recsigs) {
LogPrint(BCLog::NET, "%s -- skipping ISDLOCK inv (peer wants recsigs): %s peer=%d\n", __func__, inv.ToString(), peer.m_id);
return;
}

LOCK(inv_relay->m_tx_inventory_mutex);
if (inv_relay->m_tx_inventory_known_filter.contains(inv.hash)) {
LogPrint(BCLog::NET, "%s -- skipping known inv: %s peer=%d\n", __func__, inv.ToString(), peer.m_id);
Expand Down Expand Up @@ -6258,7 +6265,11 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
if (islock == nullptr) continue;
uint256 isLockHash{::SerializeHash(*islock)};
tx_relay->m_tx_inventory_known_filter.insert(isLockHash);
queueAndMaybePushInv(CInv(MSG_ISDLOCK, isLockHash));
// Skip ISDLOCK inv announcements for peers that want recsigs, as they can reconstruct
// the islock from the recsig
if (!peer->m_wants_recsigs) {
queueAndMaybePushInv(CInv(MSG_ISDLOCK, isLockHash));
}
}

// Send an inv for the best ChainLock we have
Expand Down
Loading