From 90d00773cb0af9bf6cfd6656a317df17d8f6165e Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sun, 10 Mar 2019 08:30:36 +1100 Subject: [PATCH] Add slashings back into per-block processing. I thought they would invalidate the attestations but I was wrong. --- .../benches/block_processing_benches.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/eth2/state_processing/benches/block_processing_benches.rs b/eth2/state_processing/benches/block_processing_benches.rs index 2ff2e7413..26c62d0d3 100644 --- a/eth2/state_processing/benches/block_processing_benches.rs +++ b/eth2/state_processing/benches/block_processing_benches.rs @@ -275,10 +275,7 @@ fn bench_block_processing( ); let state = initial_state.clone(); - let mut block = initial_block.clone(); - // Slashings will invalidate the attestations. - block.body.proposer_slashings = vec![]; - block.body.attester_slashings = vec![]; + let block = initial_block.clone(); let spec = initial_spec.clone(); c.bench( &format!("block_processing_{}", desc), @@ -346,14 +343,11 @@ fn bench_block_processing( ); let state = initial_state.clone(); - let mut block = initial_block.clone(); - // Slashings will invalidate the attestations. - block.body.proposer_slashings = vec![]; - block.body.attester_slashings = vec![]; + let block = initial_block.clone(); let spec = initial_spec.clone(); c.bench( &format!("block_processing_{}", desc), - Benchmark::new("per_block_processing_no_slashings", move |b| { + Benchmark::new("per_block_processing", move |b| { b.iter_with_setup( || state.clone(), |mut state| black_box(per_block_processing(&mut state, &block, &spec).unwrap()),