diff --git a/state-chain/pallets/cf-vaults/src/lib.rs b/state-chain/pallets/cf-vaults/src/lib.rs index c8b4f22b0f..6333138a06 100644 --- a/state-chain/pallets/cf-vaults/src/lib.rs +++ b/state-chain/pallets/cf-vaults/src/lib.rs @@ -259,8 +259,9 @@ impl, I: 'static> VaultKeyWitnessedHandler for Pallet, I: 'static> EpochTransitionHandler for Pallet { fn on_expired_epoch(expired_epoch: EpochIndex) { - for epoch in - VaultStartBlockNumbers::::iter_keys().filter(|epoch| *epoch <= expired_epoch) + for epoch in VaultStartBlockNumbers::::iter_keys() + .filter(|epoch| *epoch <= expired_epoch) + .collect::>() { VaultStartBlockNumbers::::remove(epoch); }