diff --git a/zebra-network/src/protocol/external/types.rs b/zebra-network/src/protocol/external/types.rs index 168d6418f..1048f33e3 100644 --- a/zebra-network/src/protocol/external/types.rs +++ b/zebra-network/src/protocol/external/types.rs @@ -82,9 +82,9 @@ impl Version { (_, Genesis) | (_, BeforeOverwinter) => 170_002, (Testnet(params), Overwinter) if params.is_default_testnet() => 170_003, (Mainnet, Overwinter) => 170_005, - // TODO: Use 170_006 for (Testnet(params), Sapling) if params.is_regtest() (`Regtest` in zcashd uses - // version 170_006 for Sapling, and the same values as Testnet for other network upgrades.) - (_, Sapling) => 170_007, + (Testnet(params), Sapling) if params.is_default_testnet() => 170_007, + (Testnet(params), Sapling) if params.is_regtest() => 170_006, + (Mainnet, Sapling) => 170_007, (Testnet(params), Blossom) if params.is_default_testnet() => 170_008, (Mainnet, Blossom) => 170_009, (Testnet(params), Heartwood) if params.is_default_testnet() => 170_010, @@ -93,11 +93,11 @@ impl Version { (Mainnet, Canopy) => 170_013, (Testnet(params), Nu5) if params.is_default_testnet() => 170_050, (Mainnet, Nu5) => 170_100, - (Testnet(params), Nu6) if params.is_default_testnet() => 170_050, - (Mainnet, Nu6) => 170_100, + (Testnet(params), Nu6) if params.is_default_testnet() => 170_110, + (Mainnet, Nu6) => 170_120, // It should be fine to reject peers with earlier network protocol versions on custom testnets for now. - (Testnet(_params), _) => CURRENT_NETWORK_PROTOCOL_VERSION.0, + (Testnet(_), _) => CURRENT_NETWORK_PROTOCOL_VERSION.0, }) } }