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

feat: block type enum #480

Merged
merged 11 commits into from
Sep 7, 2023
Prev Previous commit
Next Next commit
feat: increment block time for RandomlySampled
  • Loading branch information
Autoparallel committed Sep 7, 2023
commit 4f794bc4399b15b787375f44766204b013a3b0e7
7 changes: 4 additions & 3 deletions arbiter-core/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ impl Environment {
let mut transactions_per_block = seeded_poisson
.clone()
.map(|mut distribution| distribution.sample());

let mut counter: usize = 0;

// Loop over the reception of calls/transactions sent through the socket
Expand Down Expand Up @@ -345,8 +344,10 @@ impl Environment {
evm.env.block.number += U256::from(1);

// This unwrap cannot fail.
transactions_per_block =
Some(seeded_poisson.clone().unwrap().sample());
let mut seeded_poisson = seeded_poisson.clone().unwrap();

evm.env.block.timestamp += U256::from(seeded_poisson.time_step);
transactions_per_block = Some(seeded_poisson.sample());
}

// Set the tx_env and prepare to process it
Expand Down