solana_stake_program/
lib.rs#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]
#[deprecated(
since = "1.8.0",
note = "Please use `solana_sdk::stake::program::id` or `solana_program::stake::program::id` instead"
)]
pub use solana_sdk::stake::program::{check_id, id};
use {
solana_feature_set::{self as feature_set, FeatureSet},
solana_sdk::{genesis_config::GenesisConfig, native_token::LAMPORTS_PER_SOL},
};
pub mod config;
pub mod points;
#[doc(hidden)]
pub mod rewards;
pub mod stake_instruction;
pub mod stake_state;
pub fn add_genesis_accounts(genesis_config: &mut GenesisConfig) -> u64 {
config::add_genesis_account(genesis_config)
}
#[inline(always)]
pub fn get_minimum_delegation(feature_set: &FeatureSet) -> u64 {
if feature_set.is_active(&feature_set::stake_raise_minimum_delegation_to_1_sol::id()) {
const MINIMUM_DELEGATION_SOL: u64 = 1;
MINIMUM_DELEGATION_SOL * LAMPORTS_PER_SOL
} else {
1
}
}