This pull request to sn_networking includes significant improvements to the handling of pending record queries, the introduction of a non-blocking command queue for network swarm commands, and various other enhancements to the codebase. The most important changes include adding support for handling multiple senders for pending record queries, introducing a non-blocking command queue for network swarm commands, and improving error handling and logging.
sn_networking/src/driver.rs: Added network_cmd_sender to SwarmDriver and implemented queue_network_swarm_cmd method to send commands off-thread. [1][2][3]
This pull request to
sn_networking
includes significant improvements to the handling of pending record queries, the introduction of a non-blocking command queue for network swarm commands, and various other enhancements to the codebase. The most important changes include adding support for handling multiple senders for pending record queries, introducing a non-blocking command queue for network swarm commands, and improving error handling and logging.Enhancements to pending record queries:
sn_networking/src/cmd.rs
: Added logic to handle multiple senders for pending record queries inGetNetworkRecord
command. [1] [2] [3]sn_networking/src/driver.rs
: ModifiedPendingGetRecord
type to include multiple senders. [1] [2] [3] [4] [5] [6] [7]Introduction of non-blocking command queue:
sn_networking/src/driver.rs
: Addednetwork_cmd_sender
toSwarmDriver
and implementedqueue_network_swarm_cmd
method to send commands off-thread. [1] [2] [3]sn_networking/src/event/request_response.rs
: Updated to usequeue_network_swarm_cmd
for sending responses. [1] [2] [3]Other improvements:
sn_networking/src/cmd.rs
: Added a timestamp toPutLocalRecord
for better tracking.sn_networking/src/driver.rs
: IncludedRecordKey
in imports and updated usage.sn_networking/src/error.rs
: MadeGetRecordError
cloneable.These changes collectively enhance the efficiency, robustness, and maintainability of the networking component.