diff --git a/aptos-move/framework/aptos-framework/sources/chain_id.move b/aptos-move/framework/aptos-framework/sources/chain_id.move index c9f42e397176e..7de743f928410 100644 --- a/aptos-move/framework/aptos-framework/sources/chain_id.move +++ b/aptos-move/framework/aptos-framework/sources/chain_id.move @@ -23,16 +23,13 @@ module aptos_framework::chain_id { } #[test_only] - fun change_id(value: u8) acquires ChainId { - let id = &mut borrow_global_mut(@aptos_framework).id; - *id = value; + public fun initialize_for_test(aptos_framework: &signer, id: u8) { + initialize(aptos_framework, id); } #[test(aptos_framework = @0x1)] fun test_get(aptos_framework: &signer) acquires ChainId { - initialize(aptos_framework, 1u8); + initialize_for_test(aptos_framework, 1u8); assert!(get() == 1u8, 1); - change_id(2u8); - assert!(get() == 2u8, 1); } }