diff --git a/rai/node/node.cpp b/rai/node/node.cpp index 1c2ca9f3..c88da8e4 100644 --- a/rai/node/node.cpp +++ b/rai/node/node.cpp @@ -2123,7 +2123,7 @@ rai::endpoint rai::peer_container::bootstrap_peer () ; for (auto i (peers.get<4> ().begin ()), n (peers.get<4> ().end ()); i != n;) { - if (i->network_version >= 0x5) + if (i->network_version >= protocol_version_bootstrap_min) { result = i->endpoint; peers.get<4> ().modify (i, [](rai::peer_information & peer_a) { diff --git a/rai/secure/common.hpp b/rai/secure/common.hpp index 5fcd41dc..dd34ec47 100644 --- a/rai/secure/common.hpp +++ b/rai/secure/common.hpp @@ -29,6 +29,9 @@ const uint8_t protocol_version = 0x0f; const uint8_t protocol_version_min = 0x07; const uint8_t node_id_version = 0x0c; +/** Do not bootstrap from nodes older than this version */ +const uint8_t protocol_version_bootstrap_min = 0x0d; + /** * A key pair. The private key is generated from the random pool, or passed in * as a hex string. The public key is derived using ed25519.