diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 1bc9ea5a8e..addcac40cd 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -4692,8 +4692,8 @@ impl Bank { self.rent_collector.rent.burn_percent = 50; // 50% rent burn } - if new_feature_activations.contains(&feature_set::spl_token_v2_multisig_fix::id()) { - self.apply_spl_token_v2_multisig_fix(); + if new_feature_activations.contains(&feature_set::spl_token_v2_self_transfer_fix::id()) { + self.apply_spl_token_v2_self_transfer_fix(); } // Remove me after a while around v1.6 if !self.no_stake_rewrite.load(Relaxed) @@ -4785,7 +4785,7 @@ impl Bank { } } - fn apply_spl_token_v2_multisig_fix(&mut self) { + fn apply_spl_token_v2_self_transfer_fix(&mut self) { if let Some(mut account) = self.get_account(&inline_spl_token_v2_0::id()) { self.capitalization.fetch_sub(account.lamports, Relaxed); account.lamports = 0; @@ -11073,7 +11073,7 @@ pub(crate) mod tests { } #[test] - fn test_spl_token_v2_multisig_fix() { + fn test_spl_token_v2_self_transfer_fix() { let (genesis_config, _mint_keypair) = create_genesis_config(0); let mut bank = Bank::new(&genesis_config); @@ -11088,7 +11088,7 @@ pub(crate) mod tests { assert_eq!(bank.get_balance(&inline_spl_token_v2_0::id()), 100); let original_capitalization = bank.capitalization(); - bank.apply_spl_token_v2_multisig_fix(); + bank.apply_spl_token_v2_self_transfer_fix(); // Account is now empty, and the account lamports were burnt assert_eq!(bank.get_balance(&inline_spl_token_v2_0::id()), 0); diff --git a/sdk/src/feature_set.rs b/sdk/src/feature_set.rs index e863b58bc4..78daecec87 100644 --- a/sdk/src/feature_set.rs +++ b/sdk/src/feature_set.rs @@ -150,6 +150,10 @@ pub mod track_writable_deescalation { solana_sdk::declare_id!("HVPSxqskEtRLRT2ZeEMmkmt9FWqoFX4vrN6f5VaadLED"); } +pub mod spl_token_v2_self_transfer_fix { + solana_sdk::declare_id!("BL99GYhdjjcv6ys22C9wPgn2aTVERDbPHHo4NbS3hgp7"); +} + lazy_static! { /// Map of feature identifiers to user-visible description pub static ref FEATURE_NAMES: HashMap = [ @@ -189,6 +193,7 @@ lazy_static! { (turbine_retransmit_peers_patch::id(), "turbine retransmit peers patch #14631"), (prevent_upgrade_and_invoke::id(), "prevent upgrade and invoke in same tx batch"), (track_writable_deescalation::id(), "track account writable deescalation"), + (spl_token_v2_self_transfer_fix::id(), "spl-token self-transfer fix"), /*************** ADD NEW FEATURES HERE ***************/ ] .iter()