Added user input max ledger seq offset limit config (#256)

- Added new config for max input ledger offset inside contract section.
- Updated implementation of getting and updating patch config inside node and c contracts.
- Skip inputs if max ledger offset exceeds, when handling user inputs and nup messages.
This commit is contained in:
Chalith Desaman
2021-02-24 09:19:36 +05:30
committed by GitHub
parent 137c199b07
commit 363116fc2a
6 changed files with 41 additions and 7 deletions

View File

@@ -149,6 +149,8 @@ class PatchConfig {
if (config.round_limits.user_input_bytes < 0 || config.round_limits.user_output_bytes < 0 || config.round_limits.npl_output_bytes < 0 ||
config.round_limits.proc_cpu_seconds < 0 || config.round_limits.proc_mem_bytes < 0 || config.round_limits.proc_ofd_count < 0)
throw "Invalid round limits.";
if (config.max_input_ledger_offset < 0)
throw "Invalid max input ledger offset";
}
}