filecoin-project / go-legs

Does the legwork for go-data-transfer
Apache License 2.0
20 stars 14 forks source link

Ignore announce messages for CID seen in previous announce #167

Closed gammazero closed 2 years ago

gammazero commented 2 years ago

When multiple indexers receive the same re-published direct announce messages from multiple peers, or receive the same announce messages both directly and over gossib-sub, these duplicate messages cause unnecessary processing.

This PR uses a small LRU cache to discard announce messages with recently seen CIDs.

Also, minor log message improvements and less logging at info level