feat: dont artifically push replication #964
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary generated by Reviewpad on 14 Nov 23 05:45 UTC
This pull request includes two patches.
The first patch removes unnecessary code related to replication in the
SwarmDriver
struct. It removes the condition that checked if the replication fetcher needs to fire events for replication keys when the node is not driving forward. This condition is no longer needed due to changes in replication behavior.The second patch makes small tweaks to the gossip message receipt for efficiency in the
Node
struct. It modifies thebroadcast
function in theNodeEventsChannel
struct to handle errors when trying to broadcast a node event and includes additional debug information. It also adds a#[debug(skip)]
attribute to themsg
field in theNodeEvent::GossipsubMsgReceived
variant to exclude it from debug output. Additionally, it refactors the event handling code in theNode
struct to handle gossip messages more efficiently and to only broadcast events if there are receivers on the events channel.Overall, these patches improve the code by removing unnecessary checks and improving efficiency in gossip message handling.