Remove active features stake program v3 and v4 (#22612)

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
This commit is contained in:
Brooks Prumo
2022-01-21 19:27:53 -06:00
committed by GitHub
parent 0cf886302d
commit a7f2fff219
5 changed files with 77 additions and 389 deletions

View File

@ -464,13 +464,16 @@ mod tests {
let custodian_keypair = Keypair::new();
let custodian_pubkey = custodian_keypair.pubkey();
let withdrawer_keypair = Keypair::new();
let withdrawer_pubkey = withdrawer_keypair.pubkey();
let message = new_stake_account(
&fee_payer_pubkey,
&funding_pubkey,
&base_pubkey,
lamports,
&Pubkey::default(),
&Pubkey::default(),
&withdrawer_pubkey,
&custodian_pubkey,
0,
);
@ -483,16 +486,17 @@ mod tests {
let lockups = get_lockups(&bank_client, &base_pubkey, 1);
let messages = lockup_stake_accounts(
&fee_payer_pubkey,
&custodian_pubkey,
&withdrawer_pubkey,
&LockupArgs {
unix_timestamp: Some(1),
custodian: Some(custodian_pubkey),
..LockupArgs::default()
},
&lockups,
None,
);
let signers = [&fee_payer_keypair, &custodian_keypair];
let signers = [&fee_payer_keypair, &withdrawer_keypair];
for message in messages {
bank_client
.send_and_confirm_message(&signers, message)
@ -501,6 +505,7 @@ mod tests {
let account = get_account_at(&bank_client, &base_pubkey, 0);
let lockup = stake_state::lockup_from(&account).unwrap();
assert_eq!(lockup.custodian, custodian_pubkey);
assert_eq!(lockup.unix_timestamp, 1);
assert_eq!(lockup.epoch, 0);