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 25, 2023
1 parent aff1487 commit 36cee60
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 @@ -282,6 +282,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)
}
schema.WriteMempoolTx(
memR.traceClient,
Expand Down

0 comments on commit 36cee60

Please sign in to comment.