Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/dpos-pbft-bos-upgrade-sl…
Browse files Browse the repository at this point in the history
…im' into feature/dpos-pbft-bos-upgrade-slim

# Conflicts:
#	libraries/chain/controller.cpp
#	libraries/chain/include/eosio/chain/pbft_database.hpp
#	libraries/chain/pbft_database.cpp
#	plugins/net_plugin/include/eosio/net_plugin/protocol.hpp
#	plugins/net_plugin/net_plugin.cpp
  • Loading branch information
VincentOCL committed May 31, 2019
2 parents 3b7068b + 1cc5e17 commit 601c8c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2538,7 +2538,6 @@ block_id_type controller::get_pbft_prepared() const {
return block_id_type{};
}


block_id_type controller::get_pbft_my_prepare() const {
if (my->my_prepare) return my->my_prepare->id;
return block_id_type{};
Expand Down Expand Up @@ -2670,7 +2669,6 @@ producer_schedule_type controller::initial_schedule() const {
return producer_schedule_type{ 0, {{eosio::chain::config::system_account_name, my->conf.genesis.initial_key}} };
}


bool controller::is_known_unexpired_transaction( const transaction_id_type& id) const {
return db().find<transaction_object, by_trx_id>(id);
}
Expand Down
8 changes: 2 additions & 6 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ namespace eosio {
break;
}
}
if (drop_pbft_count) wlog("dropped ${n} outdated pbft messages", ("n",drop_pbft_count));

//drop timeout messages in mem, init send buffer only when actual send happens
//copied from a previous version of connection::enqueue
connection_wptr weak_this = shared_from_this();
Expand Down Expand Up @@ -2971,11 +2971,7 @@ namespace eosio {

template<typename M>
bool net_plugin_impl::is_pbft_msg_outdated(M const & msg) {
if (time_point_sec(time_point::now()) > time_point_sec(msg.timestamp) + pbft_message_TTL) {
wlog("received a outdated pbft message ${m}", ("m", msg));
return true;
}
return false;
return (time_point_sec(time_point::now()) > time_point_sec(msg.timestamp) + pbft_message_TTL);
}

template<typename M>
Expand Down

0 comments on commit 601c8c6

Please sign in to comment.