From 2c02591e247694597a0b7f36a74d348104d95435 Mon Sep 17 00:00:00 2001 From: Davor Hirunda Date: Thu, 2 Jun 2022 16:18:15 +0000 Subject: [PATCH] Fix for scheduler wrong state --- .../chain/include/graphene/chain/global_property_object.hpp | 1 + libraries/net/node.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/chain/include/graphene/chain/global_property_object.hpp b/libraries/chain/include/graphene/chain/global_property_object.hpp index 0f95a6e3..53bdec08 100644 --- a/libraries/chain/include/graphene/chain/global_property_object.hpp +++ b/libraries/chain/include/graphene/chain/global_property_object.hpp @@ -131,6 +131,7 @@ namespace graphene { namespace chain { }} FC_REFLECT_DERIVED( graphene::chain::dynamic_global_property_object, (graphene::db::object), + (random) (head_block_number) (head_block_id) (time) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index f70584ec..0c95a419 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -92,6 +92,7 @@ #define DEFAULT_LOGGER "p2p" #define P2P_IN_DEDICATED_THREAD 1 +#define DISABLE_WITNESS_HF_CHECK 1 #define INVOCATION_COUNTER(name) \ static unsigned total_ ## name ## _counter = 0; \ @@ -1905,8 +1906,10 @@ namespace graphene { namespace net { namespace detail { // last hardfork time. We are setting to 0 which will disconnect the node // on hello message originating_peer->last_known_hardfork_time = fc::time_point_sec(0); + if(DISABLE_WITNESS_HF_CHECK) { + originating_peer->last_known_hardfork_time = _delegate->get_last_known_hardfork_time(); + } } - } void node_impl::on_hello_message( peer_connection* originating_peer, const hello_message& hello_message_received )