Skip to content

Commit c5bfb57

Browse files
committed
chore: drop ISDLOCK_PROTO_VERSION checks
1 parent 4096d77 commit c5bfb57

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/net_processing.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -650,13 +650,13 @@ class PeerManagerImpl final : public PeerManager
650650
void AskPeersForTransaction(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
651651

652652
/** Relay inventories to peers that find it relevant */
653-
void RelayInvFiltered(const CInv& inv, const CTransaction& relatedTx, const int minProtoVersion) EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
653+
void RelayInvFiltered(const CInv& inv, const CTransaction& relatedTx) EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
654654

655655
/**
656656
* This overload will not update node filters, use it only for the cases
657657
* when other messages will update related transaction data in filters
658658
*/
659-
void RelayInvFiltered(const CInv& inv, const uint256& relatedTxHash, const int minProtoVersion) EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
659+
void RelayInvFiltered(const CInv& inv, const uint256& relatedTxHash) EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
660660

661661
void EraseObjectRequest(NodeId nodeid, const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
662662

@@ -2402,15 +2402,15 @@ void PeerManagerImpl::RelayDSQ(const CCoinJoinQueue& queue)
24022402
}
24032403
}
24042404

2405-
void PeerManagerImpl::RelayInvFiltered(const CInv& inv, const CTransaction& relatedTx, const int minProtoVersion)
2405+
void PeerManagerImpl::RelayInvFiltered(const CInv& inv, const CTransaction& relatedTx)
24062406
{
24072407
// TODO: Migrate to iteration through m_peer_map
24082408
m_connman.ForEachNode([&](CNode* pnode) {
24092409
PeerRef peer = GetPeerRef(pnode->GetId());
24102410
if (peer == nullptr) return;
24112411

24122412
auto tx_relay = peer->GetTxRelay();
2413-
if (pnode->nVersion < minProtoVersion || !pnode->CanRelay() || tx_relay == nullptr) {
2413+
if (!pnode->CanRelay() || tx_relay == nullptr) {
24142414
return;
24152415
}
24162416

@@ -2427,15 +2427,15 @@ void PeerManagerImpl::RelayInvFiltered(const CInv& inv, const CTransaction& rela
24272427
});
24282428
}
24292429

2430-
void PeerManagerImpl::RelayInvFiltered(const CInv& inv, const uint256& relatedTxHash, const int minProtoVersion)
2430+
void PeerManagerImpl::RelayInvFiltered(const CInv& inv, const uint256& relatedTxHash)
24312431
{
24322432
// TODO: Migrate to iteration through m_peer_map
24332433
m_connman.ForEachNode([&](CNode* pnode) {
24342434
PeerRef peer = GetPeerRef(pnode->GetId());
24352435
if (peer == nullptr) return;
24362436

24372437
auto tx_relay = peer->GetTxRelay();
2438-
if (pnode->nVersion < minProtoVersion || !pnode->CanRelay() || tx_relay == nullptr) {
2438+
if (!pnode->CanRelay() || tx_relay == nullptr) {
24392439
return;
24402440
}
24412441

@@ -3525,9 +3525,9 @@ void PeerManagerImpl::PostProcessMessage(MessageProcessingResult&& result, NodeI
35253525
if (result.m_inv_filter) {
35263526
const auto& [inv, filter] = result.m_inv_filter.value();
35273527
if (std::holds_alternative<CTransactionRef>(filter)) {
3528-
RelayInvFiltered(inv, *std::get<CTransactionRef>(filter), ISDLOCK_PROTO_VERSION);
3528+
RelayInvFiltered(inv, *std::get<CTransactionRef>(filter));
35293529
} else if (std::holds_alternative<uint256>(filter)) {
3530-
RelayInvFiltered(inv, std::get<uint256>(filter), ISDLOCK_PROTO_VERSION);
3530+
RelayInvFiltered(inv, std::get<uint256>(filter));
35313531
} else {
35323532
assert(false);
35333533
}
@@ -6211,7 +6211,6 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
62116211

62126212
const auto islock = m_llmq_ctx->isman->GetInstantSendLockByTxid(hash);
62136213
if (islock == nullptr) continue;
6214-
if (pto->nVersion < ISDLOCK_PROTO_VERSION) continue;
62156214
uint256 isLockHash{::SerializeHash(*islock)};
62166215
tx_relay->m_tx_inventory_known_filter.insert(isLockHash);
62176216
queueAndMaybePushInv(CInv(MSG_ISDLOCK, isLockHash));

src/version.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ static const int MIN_PEER_PROTO_VERSION = 70221;
2222
//! minimum proto version of masternode to accept in DKGs
2323
static const int MIN_MASTERNODE_PROTO_VERSION = 70238;
2424

25-
//! introduction of instant send deterministic lock (ISDLOCK)
26-
static const int ISDLOCK_PROTO_VERSION = 70220;
27-
2825
//! GOVSCRIPT was activated in this version
2926
static const int GOVSCRIPT_PROTO_VERSION = 70221;
3027

0 commit comments

Comments
 (0)