solana_svm::account_loader

Function validate_fee_payer

Source
pub fn validate_fee_payer(
    payer_address: &Pubkey,
    payer_account: &mut AccountSharedData,
    payer_index: IndexOfAccount,
    error_metrics: &mut TransactionErrorMetrics,
    rent_collector: &dyn SVMRentCollector,
    fee: u64,
) -> Result<()>
Expand description

Check whether the payer_account is capable of paying the fee. The side effect is to subtract the fee amount from the payer_account balance of lamports. If the payer_acount is not able to pay the fee, the error_metrics is incremented, and a specific error is returned.