Skip to content

Commit

Permalink
Silence SON logs when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
serkixenos committed Jun 15, 2022
1 parent 29189b3 commit 02d898d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions libraries/chain/db_maint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,10 @@ void database::update_active_committee_members()

void database::update_active_sons()
{ try {
if (head_block_time() < HARDFORK_SON_TIME) {
return;
}

assert( _son_count_histogram_buffer.size() > 0 );
share_type stake_target = (_total_voting_stake-_son_count_histogram_buffer[0]) / 2;

Expand Down Expand Up @@ -759,11 +763,7 @@ void database::update_active_sons()
}
}

if (son_sets_equal) {
ilog( "Active SONs set NOT CHANGED" );
} else {
ilog( "Active SONs set CHANGED" );

if (!son_sets_equal) {
update_son_wallet(new_active_sons);
update_son_statuses(cur_active_sons, new_active_sons);
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/net/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ namespace graphene { namespace net { namespace detail {
// reconnect with the rest of the network, or it might just futher isolate us.
{
// As usual, the first step is to walk through all our peers and figure out which
// peers need action (disconnecting, sending keepalives, etc), then we walk through
// peers need action (disconnecting, sending keepalives, etc), then we walk through
// those lists yielding at our leisure later.
ASSERT_TASK_NOT_PREEMPTED();

Expand Down

0 comments on commit 02d898d

Please sign in to comment.