mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-13 00:38:34 +08:00
log when dupe block is prevented
This commit is contained in:
@ -71,6 +71,7 @@ func (s *strategist) ShouldSendBlockToPeer(k u.Key, p peer.Peer) bool {
|
|||||||
// Dont resend blocks within a certain time period
|
// Dont resend blocks within a certain time period
|
||||||
t, ok := ledger.sentToPeer[k]
|
t, ok := ledger.sentToPeer[k]
|
||||||
if ok && t.Add(resendTimeoutPeriod).After(time.Now()) {
|
if ok && t.Add(resendTimeoutPeriod).After(time.Now()) {
|
||||||
|
log.Error("Prevented block resend!")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user