-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: incorrect params serialisation for EthGetBlockReceipts (#5131)
- Loading branch information
1 parent
99c877d
commit 67ff65d
Showing
3 changed files
with
4 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,4 @@ | ||
// Copyright 2019-2025 ChainSafe Systems | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use crate::shim::address::Address; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] | ||
pub struct CreateExternalReturn { | ||
pub actor_id: u64, | ||
pub robust_address: Address, | ||
pub eth_address: [u8; 20], | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
use crate::utils::encoding::from_slice_with_fallback; | ||
use fvm_ipld_encoding::to_vec; | ||
|
||
#[test] | ||
fn test_create_external_return_roundtrip() { | ||
let ret_struct = CreateExternalReturn { | ||
actor_id: 666, | ||
robust_address: Address::new_id(2), | ||
eth_address: [0; 20], | ||
}; | ||
let struct_encoded = to_vec(&ret_struct).unwrap(); | ||
|
||
let struct_decoded: CreateExternalReturn = | ||
from_slice_with_fallback(&struct_encoded).unwrap(); | ||
assert_eq!(struct_decoded, ret_struct); | ||
} | ||
} | ||
pub type CreateExternalReturn = fil_actor_eam_state::v16::CreateExternalReturn; |