Skip to content

Commit

Permalink
load placeholder code cid from manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
alexytsu committed Oct 18, 2023
1 parent 023d52f commit 11d3ba8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions integration_tests/src/tests/init_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@ use crate::tests::TEST_REGISTRY;
use export_macro::exported_test;
use fil_actor_init::Exec4Return;
use fil_actors_runtime::{
cbor::serialize,
runtime::EMPTY_ARR_CID,
test_utils::{MULTISIG_ACTOR_CODE_ID, PLACEHOLDER_ACTOR_CODE_ID},
EAM_ACTOR_ADDR, EAM_ACTOR_ID, INIT_ACTOR_ADDR,
cbor::serialize, runtime::EMPTY_ARR_CID, test_utils::MULTISIG_ACTOR_CODE_ID, EAM_ACTOR_ADDR,
EAM_ACTOR_ID, INIT_ACTOR_ADDR,
};
use fvm_shared::{address::Address, econ::TokenAmount, error::ExitCode, METHOD_SEND};
use num_traits::Zero;
use vm_api::{util::serialize_ok, VM};
use vm_api::{builtin::Type, util::serialize_ok, VM};

use crate::{FIRST_TEST_USER_ADDR, TEST_FAUCET_ADDR};

fn assert_placeholder_actor(exp_bal: TokenAmount, v: &dyn VM, addr: Address) {
let act = v.actor(&addr).unwrap();
assert_eq!(EMPTY_ARR_CID, act.state);
assert_eq!(*PLACEHOLDER_ACTOR_CODE_ID, act.code);
assert_eq!(&Type::Placeholder, v.actor_manifest().get(&act.code).unwrap());
assert_eq!(exp_bal, act.balance);
}

Expand Down

0 comments on commit 11d3ba8

Please sign in to comment.