replication_fetcher.add_keys will result in the same thing with or without all the preprocessing now
This pull request primarily focuses on refactoring and simplifying the SwarmDriver implementation in sn_networking/src/event/request_response.rs and the ReplicationFetcher implementation in sn_networking/src/replication_fetcher.rs. The main changes involve removing unnecessary methods, consolidating code, and improving readability.
Refactoring in sn_networking/src/event/request_response.rs:
Removed the libp2p::PeerId import as it was no longer needed.
Added a more_than_one_key variable to improve code readability.
Simplified the logic for adding keys and triggering chunk_proof checks by using the more_than_one_key variable.
Removed the select_non_existent_records_for_replications and is_in_close_range methods as they were no longer necessary.
Refactoring in sn_networking/src/replication_fetcher.rs:
Changed the add_keys method to filter out locally stored keys from the incoming keys, which simplifies the logic and improves performance.
Updated the logic for handling new data in the add_keys method to use the filtered list of incoming keys. [1][2]
Updated the logic for filtering out out_of_range keys in the add_keys method to use the filtered list of incoming keys.
replication_fetcher.add_keys
will result in the same thing with or without all the preprocessing nowThis pull request primarily focuses on refactoring and simplifying the
SwarmDriver
implementation insn_networking/src/event/request_response.rs
and theReplicationFetcher
implementation insn_networking/src/replication_fetcher.rs
. The main changes involve removing unnecessary methods, consolidating code, and improving readability.Refactoring in
sn_networking/src/event/request_response.rs
:libp2p::PeerId
import as it was no longer needed.more_than_one_key
variable to improve code readability.more_than_one_key
variable.select_non_existent_records_for_replications
andis_in_close_range
methods as they were no longer necessary.Refactoring in
sn_networking/src/replication_fetcher.rs
:add_keys
method to filter out locally stored keys from the incoming keys, which simplifies the logic and improves performance.add_keys
method to use the filtered list of incoming keys. [1] [2]add_keys
method to use the filtered list of incoming keys.