Skip to content

Commit

Permalink
#1870 introduce maxHistoricStateDbSize
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Aug 12, 2024
1 parent 39b6d8e commit e9614a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions libethcore/ChainOperationParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ struct SChain {
bool multiTransactionMode = false;
int emptyBlockIntervalMs = -1;
int64_t levelDBReopenIntervalMs = -1;
int64_t maxHistoricStateDbSize = -1;
size_t t = 1;

// key is patch name
Expand Down
5 changes: 5 additions & 0 deletions libethereum/ChainParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ void ChainParams::processSkaleConfigItems( ChainParams& cp, json_spirit::mObject
sChainObj.at( "levelDBReopenIntervalMs" ).get_int64() :
c_defaultLevelDBReopenIntervalMs;

// negative maxHistoricStateDbSize means rotations are disabled
s.maxHistoricStateDbSize = sChainObj.count( "maxHistoricStateDbSize" ) ?
sChainObj.at( "maxHistoricStateDbSize" ).get_int64() :
-1;

s.contractStorageLimit = sChainObj.count( "contractStorageLimit" ) ?
sChainObj.at( "contractStorageLimit" ).get_int64() :
0;
Expand Down
1 change: 1 addition & 0 deletions libethereum/ValidationSchemes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ void validateConfigJson( js::mObject const& _obj ) {
{ "emptyBlockIntervalAfterCatchupMs",
{ { js::int_type }, JsonFieldPresence::Optional } },
{ "levelDBReopenIntervalMs", { { js::int_type }, JsonFieldPresence::Optional } },
{ "maxHistoricStateDbSize", { { js::int_type }, JsonFieldPresence::Optional } },
{ "snapshotIntervalSec", { { js::int_type }, JsonFieldPresence::Optional } },
{ "snapshotDownloadTimeout", { { js::int_type }, JsonFieldPresence::Optional } },
{ "snapshotDownloadInactiveTimeout",
Expand Down

0 comments on commit e9614a5

Please sign in to comment.