diff --git a/ipc/sdk/src/checkpoint.rs b/ipc/sdk/src/checkpoint.rs index 9fbcacf4..a604f999 100644 --- a/ipc/sdk/src/checkpoint.rs +++ b/ipc/sdk/src/checkpoint.rs @@ -56,7 +56,7 @@ pub struct BottomUpCheckpoint { /// By not including cross messages here directly, we can be compatible with IPLD Resolver based /// approach where the messages are fetched with Bitswap and provided by Fendermint, or the full-fat /// approach we need with Lotus, where the messages are part of the relayed transaction. - pub cross_messages_hash: Vec + pub cross_messages_hash: Vec, } /// Validators tracks all the validator in the subnet. It is useful in handling top-down checkpoints. @@ -82,6 +82,4 @@ impl Validators { } #[cfg(test)] -mod tests { - -} +mod tests {} diff --git a/ipc/sdk/src/evm.rs b/ipc/sdk/src/evm.rs index f6a8f3eb..8b01c015 100644 --- a/ipc/sdk/src/evm.rs +++ b/ipc/sdk/src/evm.rs @@ -4,17 +4,17 @@ //! Type conversion for IPC Agent struct with solidity contract struct use crate::address::IPCAddress; +use crate::checkpoint::BottomUpCheckpoint; use crate::cross::{CrossMsg, StorableMsg}; use crate::staking::StakingChange; use crate::staking::StakingChangeRequest; use crate::subnet_id::SubnetID; -use crate::checkpoint::BottomUpCheckpoint; use crate::{eth_to_fil_amount, ethers_address_to_fil_address}; -use fvm_shared::clock::ChainEpoch; use anyhow::anyhow; use ethers::types::U256; use fvm_ipld_encoding::RawBytes; use fvm_shared::address::{Address, Payload}; +use fvm_shared::clock::ChainEpoch; use fvm_shared::econ::TokenAmount; use fvm_shared::MethodNum; use ipc_actors_abis::{ @@ -173,21 +173,18 @@ macro_rules! bottom_up_type_conversion { type Error = anyhow::Error; fn try_from(value: $module::BottomUpCheckpoint) -> Result { - Ok( - BottomUpCheckpoint { - subnet_id: SubnetID::try_from(value.subnet_id)?, - block_height: value.block_height as ChainEpoch, - block_hash: value.block_hash.to_vec(), - next_configuration_number: value.next_configuration_number, - cross_messages_hash: value.cross_messages_hash.to_vec(), - } - ) + Ok(BottomUpCheckpoint { + subnet_id: SubnetID::try_from(value.subnet_id)?, + block_height: value.block_height as ChainEpoch, + block_hash: value.block_hash.to_vec(), + next_configuration_number: value.next_configuration_number, + cross_messages_hash: value.cross_messages_hash.to_vec(), + }) } } }; } - base_type_conversion!(gateway_router_facet); base_type_conversion!(subnet_actor_getter_facet); base_type_conversion!(gateway_manager_facet);