diff --git a/plugins/net_plugin/include/eos/net_plugin/protocol.hpp b/plugins/net_plugin/include/eos/net_plugin/protocol.hpp index f9a2a54bb04..61f9571bf5c 100644 --- a/plugins/net_plugin/include/eos/net_plugin/protocol.hpp +++ b/plugins/net_plugin/include/eos/net_plugin/protocol.hpp @@ -1,3 +1,7 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ #pragma once #include #include @@ -8,7 +12,7 @@ namespace eosio { using namespace fc; struct handshake_message { - int16_t network_version = 0; + int16_t network_version = 0; ///< derived from git commit hash, not sequential chain_id_type chain_id; ///< used to identify chain fc::sha256 node_id; ///< used to identify peers and prevent self-connect string p2p_address; diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index 9d9c770dcec..f10e68082ee 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -215,7 +215,6 @@ namespace eosio { constexpr auto def_conn_retry_wait = std::chrono::seconds (30); constexpr auto def_txn_expire_wait = std::chrono::seconds (3); constexpr auto def_resp_expected_wait = std::chrono::seconds (1); - constexpr auto def_network_version = 0; constexpr auto def_sync_rec_span = 10; constexpr auto def_max_just_send = 1300 * 3; // "mtu" * 3 constexpr auto def_send_whole_blocks = true; @@ -2102,7 +2101,7 @@ namespace eosio { sync_manager::logger.set_log_level(logl); } - my->network_version = def_network_version; + my->network_version = (uint16_t)app().version_int(); my->send_whole_blocks = def_send_whole_blocks; my->sync_master.reset( new sync_manager( def_sync_rec_span ) ); diff --git a/programs/eosc/config.hpp.in b/programs/eosc/config.hpp.in index f0a0f3c649e..781720ddb93 100644 --- a/programs/eosc/config.hpp.in +++ b/programs/eosc/config.hpp.in @@ -1,6 +1,8 @@ /** @file * @copyright defined in eos/LICENSE.txt - **/ + * + * \warning This file is machine generated. DO NOT EDIT. See config.hpp.in for changes. + */ namespace eosio { namespace client { namespace config { constexpr char version_str[] = "${eosc_BUILD_VERSION}"; diff --git a/programs/eosd/config.hpp.in b/programs/eosd/config.hpp.in new file mode 100644 index 00000000000..c4aedb80175 --- /dev/null +++ b/programs/eosd/config.hpp.in @@ -0,0 +1,17 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + * + * \warning This file is machine generated. DO NOT EDIT. See config.hpp.in for changes. + */ +#pragma once + +#ifndef CONFIG_HPP_IN +#define CONFIG_HPP_IN + +namespace eosio { namespace eosd { namespace config { + constexpr char version_str[] = "${eosd_BUILD_VERSION}"; + constexpr uint64_t version_int = 0x${eosd_BUILD_VERSION}; +}}} + +#endif // CONFIG_HPP_IN diff --git a/programs/launcher/config.hpp.in b/programs/launcher/config.hpp.in new file mode 100644 index 00000000000..1bb4d10b59a --- /dev/null +++ b/programs/launcher/config.hpp.in @@ -0,0 +1,16 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + * + * \warning This file is machine generated. DO NOT EDIT. See config.hpp.in for changes. + */ +#pragma once + +#ifndef CONFIG_HPP_IN +#define CONFIG_HPP_IN + +namespace eosio { namespace launcher { namespace config { + constexpr char version_str[] = "${launcher_BUILD_VERSION}"; +}}} + +#endif // CONFIG_HPP_IN