vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
240 stars 52 forks source link

Send IDONTWANT before validating message #1103

Closed arnetheduck closed 3 weeks ago

arnetheduck commented 1 month ago

Even before we've done validation, we already know we don't want additional copies of the message.

Also, increase the minimum threshold for sending IDONTWANT to 512 to prevent spam in case of very small message id:s

arnetheduck commented 1 month ago

fyi, the tests need updating to take into account the new behavior