From 2c63eef640943ae18b6a2ae310890314f13a5215 Mon Sep 17 00:00:00 2001 From: elmattic Date: Wed, 8 Dec 2021 18:26:53 +0100 Subject: [PATCH] Fix expiration set validation order --- vm/actor/src/builtin/miner/expiration_queue.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/actor/src/builtin/miner/expiration_queue.rs b/vm/actor/src/builtin/miner/expiration_queue.rs index f5250a976994..b3275518e8e1 100644 --- a/vm/actor/src/builtin/miner/expiration_queue.rs +++ b/vm/actor/src/builtin/miner/expiration_queue.rs @@ -325,13 +325,13 @@ impl<'db, BS: BlockStore> ExpirationQueue<'db, BS> { rescheduled_power += &expiration_set.faulty_power; } - expiration_set.validate_state()?; - Ok(()) })?; for (epoch, expiration_set) in mutated_expiration_sets { + let res = expiration_set.validate_state(); self.must_update(epoch, expiration_set)?; + res?; } // If we didn't reschedule anything, we're done.