Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use coherent PublicKeyFormat in parse_slice #4783

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions massa-execution-worker/src/active_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down
5 changes: 1 addition & 4 deletions massa-execution-worker/src/interface_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>> {
// 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());
Expand Down
Loading