Skip to main content

select_random_address

Function select_random_address 

Source
fn select_random_address(
    current: Address,
    test_runner: &mut TestRunner,
    state: &EvmFuzzState,
    senders: Option<&SenderFilters>,
) -> Option<Address>
Expand description

Selects a random address for mutation, respecting sender filters if provided.

Priority:

  1. If senders has targeted addresses, pick randomly from those
  2. Otherwise, pick from the dictionary state values (excluding any in senders.excluded)
  3. Returns None if no suitable address is found or if the selected address equals current