Skip to content

Commit

Permalink
806 fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Apr 30, 2024
1 parent 06e2db4 commit e435079
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions chains/Schain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ Schain::Schain( weak_ptr< Node > _node, schain_index _schainIndex, const schain_



// construct monitoring, timeout and stuck detection agents early
// construct monitoring, timeout, stuck detection, and optimizer agents early
monitoringAgent = make_shared< MonitoringAgent >( *this );
optimizerAgent = make_shared< OptimizerAgent >( *this );

if ( !getNode()->isSyncOnlyNode() ) {
timeoutAgent = make_shared< TimeoutAgent >( *this );
Expand Down Expand Up @@ -321,6 +320,7 @@ void Schain::constructChildAgents() {
MONITOR( __CLASS_NAME__, __FUNCTION__ )

try {
optimizerAgent = make_shared< OptimizerAgent >( *this );
oracleResultAssemblyAgent = make_shared< OracleResultAssemblyAgent >( *this );
pricingAgent = make_shared< PricingAgent >( *this );
catchupClientAgent = make_shared< CatchupClientAgent >( *this );
Expand Down Expand Up @@ -564,11 +564,12 @@ void Schain::proposeNextBlock( bool _isCalledAfterCatchup ) {

proposedBlockArrived( myProposal );

// a node skips sending and saving its proposal during optimized blockconsensus if
// the node was not a winner last time

if (getSchain()->getOptimizerAgent()->skipSendingProposalToTheNetwork(_proposedBlockID)) {
return;
if (getOptimizerAgent()->skipSendingProposalToTheNetwork(_proposedBlockID)) {
// a node skips sending and saving its proposal during
// optimized block consensus, if the node was not a winner
// last time
return; // dont propose
}

LOG(debug, "PROPOSING BLOCK NUMBER:" << to_string(_proposedBlockID));
Expand Down

0 comments on commit e435079

Please sign in to comment.