File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
aptos-move/framework/aptos-framework/sources Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ module aptos_framework::account {
201
201
202
202
// NOTE: @core_resources gets created via a `create_account` call, so we do not include it below.
203
203
assert !(
204
- new_address != @vm_reserved && new_address != @aptos_framework && new_address != @aptos_token ,
204
+ new_address != @vm_reserved && new_address != @aptos_framework && new_address != @aptos_token && new_address != @0xa550c18 ,
205
205
error::invalid_argument (ECANNOT_RESERVED_ADDRESS )
206
206
);
207
207
@@ -1573,4 +1573,10 @@ module aptos_framework::account {
1573
1573
let event = CoinRegisterEvent { type_info: type_info::type_of <SadFakeCoin >() };
1574
1574
assert !(!event::was_event_emitted_by_handle (eventhandle, &event), 3 );
1575
1575
}
1576
+
1577
+ #[test]
1578
+ #[expected_failure(abort_code = 65541 , location = Self)]
1579
+ public entry fun test_cannot_create_account_at_core_resources_address () {
1580
+ create_account (@0xa550c18 );
1581
+ }
1576
1582
}
Original file line number Diff line number Diff line change @@ -529,7 +529,9 @@ module aptos_framework::genesis {
529
529
assert !(coin::balance <AptosCoin >(addr0) == 12345 , 2 );
530
530
}
531
531
532
+ /// Expected to fail after post-l1-merge release; it's okay because we will not regenesis.
532
533
#[test(aptos_framework = @0x1 , root = @0xabcd )]
534
+ #[expected_failure(abort_code = 65541 , location = aptos_framework::account)]
533
535
fun test_create_root_account (aptos_framework: &signer ) {
534
536
use aptos_framework::aggregator_factory;
535
537
use aptos_framework::object;
You can’t perform that action at this time.
0 commit comments