Skip to content

Commit

Permalink
feat: mempool v1 records which peer it has sent the tx (#1089)
Browse files Browse the repository at this point in the history
This PR records that we have sent the peer the transaction to avoid
doing it a second time
  • Loading branch information
cmwaters committed Sep 22, 2023
1 parent 86e67b7 commit 43db8d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mempool/v1/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) {
if !success {
time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond)
continue
} else {
// record that we have sent the peer the transaction
// to avoid doing it a second time
memTx.SetPeer(peerID)
}
}

Expand Down

0 comments on commit 43db8d0

Please sign in to comment.