Skip to content

Commit ed810be

Browse files
committed
chore: clean up unneeded feature flag checks
1 parent 793514e commit ed810be

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

aptos-move/framework/aptos-framework/sources/account.move

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module aptos_framework::account {
55
use std::option::{Self, Option};
66
use std::signer;
77
use std::vector;
8-
use std::features::get_decommission_core_resources_enabled;
98
use aptos_framework::chain_id;
109
use aptos_framework::create_signer::create_signer;
1110
use aptos_framework::event::{Self, EventHandle};
@@ -130,10 +129,6 @@ module aptos_framework::account {
130129
/// authentication keys. Without such separation, an adversary could create (and get a signer for) a resource account
131130
/// whose address matches an existing address of a MultiEd25519 wallet.
132131
const DERIVE_RESOURCE_ACCOUNT_SCHEME: u8 = 255;
133-
134-
/// Feature flag for decommissioning core resources.
135-
const DECOMMISSION_CORE_RESOURCES: u64 = 222;
136-
137132
/// Account already exists
138133
const EACCOUNT_ALREADY_EXISTS: u64 = 1;
139134
/// Account does not exist
@@ -205,16 +200,7 @@ module aptos_framework::account {
205200
// there cannot be an Account resource under new_addr already.
206201
assert!(!exists<Account>(new_address), error::already_exists(EACCOUNT_ALREADY_EXISTS));
207202

208-
// Check if the feature flag for decommissioning core resources is enabled.
209-
if (get_decommission_core_resources_enabled()) {
210-
// Assert separately for the core resources address if the feature flag is enabled.
211-
assert!(
212-
new_address != @0xa550c18,
213-
error::invalid_argument(ECANNOT_RESERVED_ADDRESS)
214-
);
215-
};
216-
217-
// Assert for other reserved addresses.
203+
// NOTE: @core_resources gets created via a `create_account` call, so we do not include it below.
218204
assert!(
219205
new_address != @vm_reserved && new_address != @aptos_framework && new_address != @aptos_token,
220206
error::invalid_argument(ECANNOT_RESERVED_ADDRESS)

0 commit comments

Comments
 (0)