Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Fix: Change default max-transaction-cpu-usage for tests #1436

Merged
merged 5 commits into from
Jul 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/TestHarness/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def comma_separated(string):
cfg.add_argument('--enable-gelf-logging', action='store_true', help='enable gelf logging appender in logging configuration file', default=False)
cfg.add_argument('--gelf-endpoint', help='hostname:port or ip:port of GELF endpoint', default='128.0.0.1:12201')
cfg.add_argument('--template', help='the startup script template', default='testnet.template')
cfg.add_argument('--max-block-cpu-usage', type=int, help='the "max-block-cpu-usage" value to use in the genesis.json file', default=200000)
cfg.add_argument('--max-transaction-cpu-usage', type=int, help='the "max-transaction-cpu-usage" value to use in the genesis.json file', default=150000)
cfg.add_argument('--max-block-cpu-usage', type=int, help='the "max-block-cpu-usage" value to use in the genesis.json file', default=None)
cfg.add_argument('--max-transaction-cpu-usage', type=int, help='the "max-transaction-cpu-usage" value to use in the genesis.json file', default=None)
cfg.add_argument('--logging-level', type=fc_log_level, help='Provide the "level" value to use in the logging.json file')
cfg.add_argument('--logging-level-map', type=json.loads, help='JSON string of a logging level dictionary to use in the logging.json file for specific nodes, matching based on node number. Ex: {"bios":"off","00":"info"}')
cfg.add_argument('--is-nodeos-v2', action='store_true', help='Toggles old nodeos compatibility', default=False)
Expand Down Expand Up @@ -359,9 +359,9 @@ def init_genesis(self):
'net_usage_leeway': 500,
'context_free_discount_net_usage_num': 20,
'context_free_discount_net_usage_den': 100,
'max_block_cpu_usage': self.args.max_block_cpu_usage,
'max_block_cpu_usage': 500000 if self.args.max_block_cpu_usage is None else self.args.max_block_cpu_usage,
'target_block_cpu_usage_pct': 1000,
'max_transaction_cpu_usage': self.args.max_transaction_cpu_usage,
'max_transaction_cpu_usage': 475000 if self.args.max_transaction_cpu_usage is None else self.args.max_transaction_cpu_usage,
'min_transaction_cpu_usage': 100,
'max_transaction_lifetime': 3600,
'deferred_trx_expiration_window': 600,
Expand All @@ -375,8 +375,8 @@ def init_genesis(self):
with open(genesis_path, 'r') as f:
genesis = json.load(f)
genesis['initial_key'] = self.network.nodes['bios'].keys[0].pubkey
genesis['initial_configuration']['max_block_cpu_usage'] = self.args.max_block_cpu_usage
genesis['initial_configuration']['max_transaction_cpu_usage'] = self.args.max_transaction_cpu_usage
if self.args.max_block_cpu_usage is not None: genesis['initial_configuration']['max_block_cpu_usage'] = self.args.max_block_cpu_usage
if self.args.max_transaction_cpu_usage is not None: genesis['initial_configuration']['max_transaction_cpu_usage'] = self.args.max_transaction_cpu_usage
return genesis

def write_genesis_file(self, node, genesis):
Expand Down