mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge d22e7ee933 into merged_master (Bitcoin PR bitcoin/bitcoin#21822)
Adding an iteration cap to a fuzztest in this PR, not because it has anything to do with this PR, but because this is where the merge script happened to be when I was done investigating 100+ minute fuzzer runs. Added a comment explaining the rationale for the iteration cap.
This commit is contained in:
commit
27eff4ad45
2 changed files with 14 additions and 1 deletions
|
|
@ -55,7 +55,20 @@ FUZZ_TARGET_INIT(process_messages, initialize_process_messages)
|
|||
connman.AddTestNode(p2p_node);
|
||||
}
|
||||
|
||||
int elements_iter_count = 0;
|
||||
while (fuzzed_data_provider.ConsumeBool()) {
|
||||
if (elements_iter_count++ > 100) {
|
||||
// ELEMENTS: this loop runs on a single core and achieves nothing that couldn't
|
||||
// be achieved by just repeating the fuzz runs. It typically takes around 11
|
||||
// minutes on Bitcoin and around 60 minutes on Elements (presumably because the
|
||||
// seed vectors aren't valid Elements messages so the fuzzer gets lost and starts
|
||||
// adding tons of iterations).
|
||||
//
|
||||
// Capping to 100 iterations reduces the run time to 4-5 minutes on both Bitcoin
|
||||
// and Elements.
|
||||
break;
|
||||
}
|
||||
|
||||
const std::string random_message_type{fuzzed_data_provider.ConsumeBytesAsString(CMessageHeader::COMMAND_SIZE).c_str()};
|
||||
|
||||
const auto mock_time = ConsumeTime(fuzzed_data_provider);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class TestBitcoinCli(BitcoinTestFramework):
|
|||
assert_equal(cli_get_info['balance']['bitcoin'], amounts[1])
|
||||
|
||||
self.log.info("Test -getinfo with -rpcwallet=unloaded wallet returns no balances")
|
||||
cli_get_info = self.nodes[0].cli('-getinfo', rpcwallet3).send_cli()
|
||||
cli_get_info_keys = self.nodes[0].cli('-getinfo', rpcwallet3).send_cli().keys()
|
||||
assert 'balance' not in cli_get_info_keys
|
||||
assert 'balances' not in cli_get_info_keys
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue