Skip to content

Commit

Permalink
Merge pull request #2 from ElrondNetwork/historical-balances
Browse files Browse the repository at this point in the history
Support for historical balances lookup
  • Loading branch information
andreibancioiu authored Aug 25, 2022
2 parents 65caae1 + 5cd2777 commit c89c94d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion adjust_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ 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)

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["Antiflood"]["WebServer"]["SimultaneousRequests"] = 512
data["StateTriesConfig"]["AccountsStatePruningEnabled"] = 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
else:
Expand Down

0 comments on commit c89c94d

Please sign in to comment.