diff --git a/Cargo.lock b/Cargo.lock index e2fafa99e93f77..6b8fbf128764cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5103,6 +5103,7 @@ dependencies = [ "solana-rayon-threadlimit", "solana-runtime", "solana-sdk 1.11.0", + "solana-stake-program", "solana-storage-bigtable", "solana-storage-proto", "solana-transaction-status", diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 391323442738ba..a44a49a826cb55 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -45,6 +45,7 @@ solana-program-runtime = { path = "../program-runtime", version = "=1.11.0" } solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.11.0" } solana-runtime = { path = "../runtime", version = "=1.11.0" } solana-sdk = { path = "../sdk", version = "=1.11.0" } +solana-stake-program = { path = "../programs/stake", version = "=1.11.0" } solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.11.0" } solana-storage-proto = { path = "../storage-proto", version = "=1.11.0" } solana-transaction-status = { path = "../transaction-status", version = "=1.11.0" } diff --git a/ledger/src/leader_schedule_cache.rs b/ledger/src/leader_schedule_cache.rs index accadce4a68cf6..465ade38d3af11 100644 --- a/ledger/src/leader_schedule_cache.rs +++ b/ledger/src/leader_schedule_cache.rs @@ -518,7 +518,8 @@ mod tests { &mint_keypair, &vote_account, &validator_identity, - bootstrap_validator_stake_lamports(), + bootstrap_validator_stake_lamports() + + solana_stake_program::get_minimum_delegation(&bank.feature_set), ); let node_pubkey = validator_identity.pubkey(); diff --git a/programs/bpf/Cargo.lock b/programs/bpf/Cargo.lock index ec1c4e5406dfbe..2dfdb74f54b8e8 100644 --- a/programs/bpf/Cargo.lock +++ b/programs/bpf/Cargo.lock @@ -4616,6 +4616,7 @@ dependencies = [ "solana-rayon-threadlimit", "solana-runtime", "solana-sdk 1.11.0", + "solana-stake-program", "solana-storage-bigtable", "solana-storage-proto", "solana-transaction-status", diff --git a/programs/stake/src/lib.rs b/programs/stake/src/lib.rs index 1041288fdb2d7c..a5731078aa6b4b 100644 --- a/programs/stake/src/lib.rs +++ b/programs/stake/src/lib.rs @@ -19,7 +19,7 @@ pub fn add_genesis_accounts(genesis_config: &mut GenesisConfig) -> u64 { /// NOTE: This is also used to calculate the minimum balance of a stake account, which is the /// rent exempt reserve _plus_ the minimum stake delegation. #[inline(always)] -pub(crate) fn get_minimum_delegation(_feature_set: &FeatureSet) -> u64 { +pub fn get_minimum_delegation(_feature_set: &FeatureSet) -> u64 { // If/when the minimum delegation amount is changed, the `feature_set` parameter will be used // to chose the correct value. And since the MINIMUM_STAKE_DELEGATION constant cannot be // removed, use it here as to not duplicate magic constants.