From d06349b3b25ceb465394f0695ba7d5e6a21936a7 Mon Sep 17 00:00:00 2001 From: sydhds Date: Wed, 4 Dec 2024 10:26:39 +0100 Subject: [PATCH] Use coherent PublicKeyFormat in parse_slice --- massa-execution-worker/src/active_history.rs | 2 ++ massa-execution-worker/src/interface_impl.rs | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/massa-execution-worker/src/active_history.rs b/massa-execution-worker/src/active_history.rs index c1f4f01177..3841a98dd1 100644 --- a/massa-execution-worker/src/active_history.rs +++ b/massa-execution-worker/src/active_history.rs @@ -439,6 +439,7 @@ mod test { let state_changes_1 = StateChanges { ledger_changes: Default::default(), async_pool_changes: async_pool_changes_1, + deferred_call_changes: Default::default(), pos_changes: Default::default(), executed_ops_changes: Default::default(), executed_denunciations_changes: Default::default(), @@ -447,6 +448,7 @@ mod test { let state_changes_2 = StateChanges { ledger_changes: Default::default(), async_pool_changes: async_pool_changes_2, + deferred_call_changes: Default::default(), pos_changes: Default::default(), executed_ops_changes: Default::default(), executed_denunciations_changes: Default::default(), diff --git a/massa-execution-worker/src/interface_impl.rs b/massa-execution-worker/src/interface_impl.rs index 07e106bee0..d71b8e3c97 100644 --- a/massa-execution-worker/src/interface_impl.rs +++ b/massa-execution-worker/src/interface_impl.rs @@ -968,10 +968,7 @@ impl Interface for InterfaceImpl { /// Address is the last 20 bytes of the hash of the public key. fn evm_get_address_from_pubkey(&self, public_key_: &[u8]) -> Result> { // parse the public key - let public_key = libsecp256k1::PublicKey::parse_slice( - public_key_, - Some(libsecp256k1::PublicKeyFormat::Raw), - )?; + let public_key = libsecp256k1::PublicKey::parse_slice(public_key_, None)?; // compute the hash of the public key let hash = sha3::Keccak256::digest(public_key.serialize());