From 6285dc3aa7af20f912173a14ff663d7ff55fff09 Mon Sep 17 00:00:00 2001 From: pscott <30843220+pscott@users.noreply.github.com> Date: Wed, 15 Jan 2020 05:41:12 +0400 Subject: [PATCH] Fix logic error in operation pool (#806) --- eth2/operation_pool/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eth2/operation_pool/src/lib.rs b/eth2/operation_pool/src/lib.rs index 877f46bf9b..0f85215e9e 100644 --- a/eth2/operation_pool/src/lib.rs +++ b/eth2/operation_pool/src/lib.rs @@ -210,6 +210,7 @@ impl OperationPool { .map(|s| s.proposer_index) .collect::>(); + let epoch = state.current_epoch(); let attester_slashings = self .attester_slashings .read() @@ -222,7 +223,7 @@ impl OperationPool { // Take all slashings that will slash 1 or more validators. let slashed_validators = get_slashable_indices_modular(state, slashing, |index, validator| { - validator.slashed || to_be_slashed.contains(&index) + validator.is_slashable_at(epoch) && !to_be_slashed.contains(&index) }); // Extend the `to_be_slashed` set so subsequent iterations don't try to include