Skip to content

Commit

Permalink
send IDONTWANT on outbound
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Sep 25, 2024
1 parent a25c5fc commit 01ea9a7
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,14 @@ open class GossipRouter(
}
val list = peers
.filterNot { peerDoesNotWantMessage(it, msg.messageId) }
.map { submitPublishMessage(it, msg) }
.map {
if (this.protocol.supportsIDontWant() &&
msg.protobufMessage.serializedSize >= params.iDontWantMinMessageSizeThreshold
) {
sendIdontwant(it, msg.messageId)
}
submitPublishMessage(it, msg)
}

mCache += msg
flushAllPending()
Expand Down

0 comments on commit 01ea9a7

Please sign in to comment.