diff --git a/Cargo.lock b/Cargo.lock index adc049bc9..3edc5ef53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2271,9 +2271,9 @@ dependencies = [ [[package]] name = "fvm_ipld_kamt" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02250be2140aa2e805e18b9427dc93fa1ad9753c8169d0807389f31739683450" +checksum = "270444092b6cb62319b5a8f1ca6ae21265d31e0c818019e9ebd63cf8b2d51cb5" dependencies = [ "anyhow", "byteorder", diff --git a/Cargo.toml b/Cargo.toml index 14a4f6768..91a4f32d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -137,7 +137,7 @@ fvm_shared = "4.5.1" fvm_ipld_encoding = "0.5.0" fvm_ipld_blockstore = "0.3.0" fvm_ipld_hamt = "0.10.2" -fvm_ipld_kamt = "0.4.2" +fvm_ipld_kamt = "0.4.3" fvm_ipld_amt = { version = "0.7.3" } fvm_ipld_bitfield = "0.7.0" diff --git a/actors/evm/src/interpreter/system.rs b/actors/evm/src/interpreter/system.rs index fd57c338f..fd1d9c453 100644 --- a/actors/evm/src/interpreter/system.rs +++ b/actors/evm/src/interpreter/system.rs @@ -504,28 +504,7 @@ impl<'r, RT: Runtime> System<'r, RT> { /// TODO create a PR for the KAMT library to support a "clear" method /// and upgrade to the new KAMT library version once its updated fn clear_transient_slots(&mut self) -> Result<(), ActorError> { - let mut keys_to_delete = Vec::new(); - - // Use `for_each` to collect all keys - self.transient_slots - .for_each(|key, _| { - keys_to_delete.push(*key); - Ok(()) - }) - .map_err( - |err| actor_error!(illegal_state; "iterating over transient_slots failed: {}", err), - )?; - - for key in keys_to_delete { - self.transient_slots.delete(&key).map_err(|err| { - actor_error!( - illegal_state; - "deleting key {key:?} from transient_slots failed: {}", - err - ) - })?; - } - + self.transient_slots.clear(); Ok(()) }