clean feature: system_transfer_zero_check (#34076)
This commit is contained in:
parent
0817cb048a
commit
f9fba7e08b
|
@ -9,7 +9,6 @@ use {
|
||||||
sysvar_cache::get_sysvar_with_account_check,
|
sysvar_cache::get_sysvar_with_account_check,
|
||||||
},
|
},
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
feature_set,
|
|
||||||
instruction::InstructionError,
|
instruction::InstructionError,
|
||||||
nonce,
|
nonce,
|
||||||
program_utils::limited_deserialize,
|
program_utils::limited_deserialize,
|
||||||
|
@ -220,14 +219,6 @@ fn transfer(
|
||||||
transaction_context: &TransactionContext,
|
transaction_context: &TransactionContext,
|
||||||
instruction_context: &InstructionContext,
|
instruction_context: &InstructionContext,
|
||||||
) -> Result<(), InstructionError> {
|
) -> Result<(), InstructionError> {
|
||||||
if !invoke_context
|
|
||||||
.feature_set
|
|
||||||
.is_active(&feature_set::system_transfer_zero_check::id())
|
|
||||||
&& lamports == 0
|
|
||||||
{
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
if !instruction_context.is_instruction_account_signer(from_account_index)? {
|
if !instruction_context.is_instruction_account_signer(from_account_index)? {
|
||||||
ic_msg!(
|
ic_msg!(
|
||||||
invoke_context,
|
invoke_context,
|
||||||
|
@ -261,14 +252,6 @@ fn transfer_with_seed(
|
||||||
transaction_context: &TransactionContext,
|
transaction_context: &TransactionContext,
|
||||||
instruction_context: &InstructionContext,
|
instruction_context: &InstructionContext,
|
||||||
) -> Result<(), InstructionError> {
|
) -> Result<(), InstructionError> {
|
||||||
if !invoke_context
|
|
||||||
.feature_set
|
|
||||||
.is_active(&feature_set::system_transfer_zero_check::id())
|
|
||||||
&& lamports == 0
|
|
||||||
{
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
if !instruction_context.is_instruction_account_signer(from_base_account_index)? {
|
if !instruction_context.is_instruction_account_signer(from_base_account_index)? {
|
||||||
ic_msg!(
|
ic_msg!(
|
||||||
invoke_context,
|
invoke_context,
|
||||||
|
|
Loading…
Reference in New Issue