upgrade network protocol version to auto disconnect from old version nodes (#282)
Some checks are pending
abi-consistent-check / build-and-compare (push) Waiting to run
code-coverage / unittest-cov (push) Waiting to run
rust / check (push) Waiting to run
rust / test (push) Waiting to run
rust / lints (push) Waiting to run
functional-test / test (push) Waiting to run

This commit is contained in:
Bo QIU 2024-11-20 19:04:22 +08:00 committed by GitHub
parent 8f4dfff2f6
commit f21d691812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,8 +96,8 @@ pub use service::{load_private_key, Context, Libp2pEvent, Service, NETWORK_KEY_F
/// Defines the current P2P protocol version.
/// - v1: Broadcast FindFile & AnnounceFile messages in the whole network, which caused network too heavey.
/// - v2: Publish NewFile to neighbors only and announce file via RPC message.
pub const PROTOCOL_VERSION_V1: [u8; 3] = [0, 1, 0];
pub const PROTOCOL_VERSION_V2: [u8; 3] = [0, 2, 0];
pub const PROTOCOL_VERSION_V1: [u8; 3] = [0, 1, 1];
pub const PROTOCOL_VERSION_V2: [u8; 3] = [0, 2, 1];
/// Application level requests sent to the network.
#[derive(Debug, Clone, Copy)]