From 11d3ba88961b642e5dbe7332156b2f971ef3755d Mon Sep 17 00:00:00 2001 From: Alex Su Date: Wed, 18 Oct 2023 16:26:08 +1100 Subject: [PATCH] load placeholder code cid from manifest --- integration_tests/src/tests/init_test.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/integration_tests/src/tests/init_test.rs b/integration_tests/src/tests/init_test.rs index 9c474640e..2ea22ae53 100644 --- a/integration_tests/src/tests/init_test.rs +++ b/integration_tests/src/tests/init_test.rs @@ -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); }