From 133f7b58ff5184e522090f478b81c7c09d24e671 Mon Sep 17 00:00:00 2001 From: Mikers Date: Thu, 12 Dec 2024 19:48:04 -1000 Subject: [PATCH] Update actors/evm/src/interpreter/system.rs Co-authored-by: Steven Allen --- actors/evm/src/interpreter/system.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/actors/evm/src/interpreter/system.rs b/actors/evm/src/interpreter/system.rs index ec1c29e01..a646369c2 100644 --- a/actors/evm/src/interpreter/system.rs +++ b/actors/evm/src/interpreter/system.rs @@ -357,18 +357,16 @@ impl<'r, RT: Runtime> System<'r, RT> { .context_code(ExitCode::USR_SERIALIZATION, "failed to decode state")? .context_code(ExitCode::USR_ILLEGAL_STATE, "state not in blockstore")?; - if let Some(transient_data) = state.transient_data { - let state_transient_data_lifespan = transient_data.transient_data_lifespan; - if self.current_transient_data_lifespan == state_transient_data_lifespan { - self.transient_slots.set_root(&transient_data.transient_data_state).context_code( + match &state.transient_data { + Some(TransientData { transient_data_state, transient_data_lifespan }) + if transient_data_lifespan == &self.current_transient_data_lifespan => + { + self.transient_slots.set_root(transient_data_state).context_code( ExitCode::USR_ILLEGAL_STATE, "transient_state not in blockstore", - )?; - } else { - self.transient_slots.clear(); + )? } - } else { - self.transient_slots.clear(); + _ => self.transient_slots.clear(), } self.slots