Skip to content

Commit 120fe65

Browse files
authored
cli: Use new devnet stake-pool program id (#172)
* cli: Use devnet stake-pool program id #### Problem The devnet deployment of the stake pool program has been out of date for a long time because the upgrade key has been lost. #### Summary of changes Since the key is lost, we need to use a different program id for devnet. Add that key and use it properly in the CLI. This PR also includes a change to specify the a program id to use. * Add devnet as an acceptable word * Parametrize get_stake_pools to take program id
1 parent e5d9c24 commit 120fe65

File tree

4 files changed

+96
-56
lines changed

4 files changed

+96
-56
lines changed

clients/cli/src/client.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ pub(crate) fn get_stake_state(
8484

8585
pub(crate) fn get_stake_pools(
8686
rpc_client: &RpcClient,
87+
stake_pool_program_id: &Pubkey,
8788
) -> Result<Vec<(Pubkey, StakePool, ValidatorList, Pubkey)>, ClientError> {
8889
rpc_client
8990
.get_program_accounts_with_config(
90-
&spl_stake_pool::id(),
91+
stake_pool_program_id,
9192
RpcProgramAccountsConfig {
9293
// 0 is the account type
9394
filters: Some(vec![RpcFilterType::Memcmp(Memcmp::new(
@@ -106,7 +107,7 @@ pub(crate) fn get_stake_pools(
106107
.into_iter()
107108
.filter_map(|(address, account)| {
108109
let pool_withdraw_authority =
109-
find_withdraw_authority_program_address(&spl_stake_pool::id(), &address).0;
110+
find_withdraw_authority_program_address(stake_pool_program_id, &address).0;
110111
match try_from_slice_unchecked::<StakePool>(account.data.as_slice()) {
111112
Ok(stake_pool) => {
112113
get_validator_list(rpc_client, &stake_pool.validator_list)

0 commit comments

Comments
 (0)