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 e435079 commit 4b545cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
26 changes: 17 additions & 9 deletions chains/Schain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,7 @@ Schain::Schain( weak_ptr< Node > _node, schain_index _schainIndex, const schain_
schainIndex( _schainIndex ) {
lastCommittedBlockTimeStamp = TimeStamp( 0, 0 );

if (getNode()->getPatchTimestamps().count("verifyDaSigsPatchTimestamp") > 0) {
this->verifyDaSigsPatchTimestampS =
getNode()->getPatchTimestamps().at("verifyDaSigsPatchTimestamp");
}

if (getNode()->getPatchTimestamps().count("verifyDaSigsPatchTimestamp") > 0) {
this->fastConsensusPatchTimestampS =
getNode()->getPatchTimestamps().at("fastConsensusPatchTimestamp");
}
setTimeStampValuesFromConfig();



Expand Down Expand Up @@ -315,6 +307,22 @@ Schain::Schain( weak_ptr< Node > _node, schain_index _schainIndex, const schain_
}



#define SET_TIMESTAMP_FROM_CONFIG(TIMESTAMP_NAME) \
{ \
auto& timestamps = getNode()->getPatchTimestamps(); \
if (timestamps.count(#TIMESTAMP_NAME) > 0) { \
TIMESTAMP_NAME = timestamps.at(#TIMESTAMP_NAME); \
} \
}


void Schain::setTimeStampValuesFromConfig() {
SET_TIMESTAMP_FROM_CONFIG(verifyDaSigsPatchTimestampS)
SET_TIMESTAMP_FROM_CONFIG(fastConsensusPatchTimestampS)
}


// called from constructor so no locks needed
void Schain::constructChildAgents() {
MONITOR( __CLASS_NAME__, __FUNCTION__ )
Expand Down
1 change: 1 addition & 0 deletions chains/Schain.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,5 @@ class Schain : public Agent {

const ptr<CatchupClientAgent> &getCatchupClientAgent() const;

void setTimeStampValuesFromConfig();
};

0 comments on commit 4b545cc

Please sign in to comment.