Skip to content

Commit

Permalink
Merge pull request #3 from ElrondNetwork/adjust-26
Browse files Browse the repository at this point in the history
Simplify / adjust config.
  • Loading branch information
andreibancioiu authored Sep 27, 2022
2 parents c89c94d + 7c78f51 commit be5d159
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions adjust_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,21 @@ def main(cli_args: List[str]):
parser = ArgumentParser()
parser.add_argument("--mode", choices=MODES, required=True)
parser.add_argument("--file", required=True)
parser.add_argument("--api-simultaneous-requests", type=int, default=512)
parser.add_argument("--num-epochs-to-keep", type=int, default=128)
parser.add_argument("--api-simultaneous-requests", type=int, default=16384)

parsed_args = parser.parse_args(cli_args)
mode = parsed_args.mode
file = parsed_args.file
api_simultaneous_requests = parsed_args.api_simultaneous_requests
num_epochs_to_keep = parsed_args.num_epochs_to_keep

data = toml.load(file)

if mode == MODE_MAIN:
data["GeneralSettings"]["StartInEpochEnabled"] = False
data["DbLookupExtensions"]["Enabled"] = True
data["StateTriesConfig"]["AccountsStatePruningEnabled"] = False
data["StoragePruning"]["ObserverCleanOldEpochsData"] = False
data["StoragePruning"]["AccountsTrieCleanOldEpochsData"] = False
data["StoragePruning"]["NumEpochsToKeep"] = num_epochs_to_keep
data["Antiflood"]["WebServer"]["SimultaneousRequests"] = api_simultaneous_requests
elif mode == MODE_PREFS:
data["Preferences"]["FullArchive"] = True
Expand Down

0 comments on commit be5d159

Please sign in to comment.