mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-220] When handling an INV message, made it skip tx invs that are currently being requested. (#352)
This commit is contained in:
parent
7c1cb47bd0
commit
2147d16c1f
@ -967,11 +967,15 @@ func (sm *SyncManager) handleInvMsg(imsg *invMsg) {
|
||||
}
|
||||
if !haveInv {
|
||||
if iv.Type == wire.InvTypeTx {
|
||||
// Skip the transaction if it has already been
|
||||
// rejected.
|
||||
// Skip the transaction if it has already been rejected.
|
||||
if _, exists := sm.rejectedTxns[daghash.TxID(*iv.Hash)]; exists {
|
||||
continue
|
||||
}
|
||||
|
||||
// Skip the transaction if it had previously been requested.
|
||||
if _, exists := state.requestedTxns[daghash.TxID(*iv.Hash)]; exists {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
// Add it to the request queue.
|
||||
|
Loading…
x
Reference in New Issue
Block a user