Skip to content

Commit

Permalink
IS 495 fir ms to sec
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Jan 3, 2025
1 parent 532e887 commit 116a691
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions catchup/client/CatchupClientAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ nlohmann::json CatchupClientAgent::readCatchupResponseHeader(
const ptr< ClientSocket >& _socket, ptr< CatchupRequestHeader > _requestHeader ) {
CHECK_ARGUMENT( _socket )
CHECK_ARGUMENT( _requestHeader )
uint32_t timeoutSec = getNode()->isSyncOnlyNode() ? getNode()->getSyncNodeCatchupTimeoutMs() :
getNode()->getCatchupTimeoutMs();
uint32_t timeoutSec = getNode()->isSyncOnlyNode() ? getNode()->getSyncNodecatchupTimeoutSec() :
getNode()->getcatchupTimeoutSec();
auto result = sChain->getIo()->readJsonHeader( _socket->getDescriptor(),
"Read catchup response", timeoutSec, _socket->getIP(), MAX_CATCHUP_DOWNLOAD_BYTES );
return result;
Expand Down
4 changes: 2 additions & 2 deletions network/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ nlohmann::json IO::readJsonHeader( file_descriptor descriptor, const char* _erro

try {
uint32_t timeoutSec = sChain->getNode()->isSyncOnlyNode() ?
sChain->getNode()->getSyncNodeReadJsonHeaderTimeoutMs() :
sChain->getNode()->getReadJsonHeaderTimeoutMs();
sChain->getNode()->getSyncNodereadJsonHeaderTimeoutSec() :
sChain->getNode()->getreadJsonHeaderTimeoutSec();
readBytes( descriptor, buf2, msg_len( sizeof( uint64_t ) ), timeoutSec );
} catch ( ExitRequestedException& ) {
throw;
Expand Down
14 changes: 7 additions & 7 deletions node/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ void Node::initParamsFromConfig() {
maxTransactionsPerBlock =
getParamUint64( "maxTransactionsPerBlock", MAX_TRANSACTIONS_PER_BLOCK );
minBlockIntervalMs = getParamUint64( "minBlockIntervalMs", MIN_BLOCK_INTERVAL_MS );
catchupTimeoutMs = getParamUint64( "catchupTimeoutMs", CATCHUP_TIMEOUT_MS );
syncNodeCatchupTimeoutMs =
getParamUint64( "syncNodeCatchupTimeoutMs", SYNC_NODE_CATCHUP_TIMEOUT_MS );
readJsonHeaderTimeoutMs =
getParamUint64( "readJsonHeaderTimeoutMs", READ_JSON_HEADER_TIMEOUT_MS );
syncNodeReadJsonHeaderTimeoutMs =
getParamUint64( "syncNodeReadJsonHeaderTimeoutMs", SYNC_NODE_READ_JSON_HEADER_TIMEOUT_MS );
catchupTimeoutSec = getParamUint64( "catchupTimeoutSec", CATCHUP_TIMEOUT_MS );
syncNodecatchupTimeoutSec =
getParamUint64( "syncNodecatchupTimeoutSec", SYNC_NODE_CATCHUP_TIMEOUT_MS );
readJsonHeaderTimeoutSec =
getParamUint64( "readJsonHeaderTimeoutSec", READ_JSON_HEADER_TIMEOUT_MS );
syncNodereadJsonHeaderTimeoutSec =
getParamUint64( "syncNodereadJsonHeaderTimeoutSec", SYNC_NODE_READ_JSON_HEADER_TIMEOUT_MS );
testNet = ( getParamUint64( "isTestNet", 0 ) > 0 );

blockDBSize = storageLimits->getBlockDbSize();
Expand Down
16 changes: 8 additions & 8 deletions node/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ class Node {

uint64_t blockDBSize = 0;

uint64_t catchupTimeoutMs = 0;
uint64_t catchupTimeoutSec = 0;

uint64_t syncNodeCatchupTimeoutMs = 0;
uint64_t syncNodecatchupTimeoutSec = 0;

uint64_t readJsonHeaderTimeoutMs = 0;
uint64_t readJsonHeaderTimeoutSec = 0;

uint64_t syncNodeReadJsonHeaderTimeoutMs = 0;
uint64_t syncNodereadJsonHeaderTimeoutSec = 0;
;
uint64_t proposalHashDBSize = 0;
uint64_t proposalVectorDBSize = 0;
Expand Down Expand Up @@ -406,13 +406,13 @@ class Node {

uint64_t getMinBlockIntervalMs() const;

uint64_t getCatchupTimeoutMs() const;
uint64_t getcatchupTimeoutSec() const;

uint64_t getSyncNodeCatchupTimeoutMs() const;
uint64_t getSyncNodecatchupTimeoutSec() const;

uint64_t getReadJsonHeaderTimeoutMs() const;
uint64_t getreadJsonHeaderTimeoutSec() const;

uint64_t getSyncNodeReadJsonHeaderTimeoutMs() const;
uint64_t getSyncNodereadJsonHeaderTimeoutSec() const;

uint64_t getWaitAfterNetworkErrorMs();

Expand Down
16 changes: 8 additions & 8 deletions node/NodeGettersSetters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,18 +430,18 @@ void Node::setExitOnBlockBoundaryRequested() {
exitOnBlockBoundaryRequested = true;
}

uint64_t Node::getCatchupTimeoutMs() const {
return catchupTimeoutMs;
uint64_t Node::getcatchupTimeoutSec() const {
return catchupTimeoutSec;
}

uint64_t Node::getSyncNodeCatchupTimeoutMs() const {
return syncNodeCatchupTimeoutMs;
uint64_t Node::getSyncNodecatchupTimeoutSec() const {
return syncNodecatchupTimeoutSec;
}

uint64_t Node::getReadJsonHeaderTimeoutMs() const {
return readJsonHeaderTimeoutMs;
uint64_t Node::getreadJsonHeaderTimeoutSec() const {
return readJsonHeaderTimeoutSec;
}

uint64_t Node::getSyncNodeReadJsonHeaderTimeoutMs() const {
return syncNodeReadJsonHeaderTimeoutMs;
uint64_t Node::getSyncNodereadJsonHeaderTimeoutSec() const {
return syncNodereadJsonHeaderTimeoutSec;
}

0 comments on commit 116a691

Please sign in to comment.