split wallet staking commands (#6168)

* split wallet staking commands

* elide real home

* unit->UNIT for usage

* unit->UNIT, don't try to run SUBCOMMANDS: ;)

* more fixup

* fixups

* actually check

* shellcheck

* preserve #6158 after rebase

* fixup

* test

* too hard

* remove test
This commit is contained in:
Rob Walker
2019-09-29 21:18:15 -07:00
committed by GitHub
parent e5a7d08966
commit 4f4618441c
15 changed files with 1457 additions and 805 deletions

View File

@@ -101,8 +101,8 @@ fn test_stake_account_delegate() {
&mint_pubkey,
&staker_pubkey,
&vote_pubkey,
1_000_000,
&authorized,
1_000_000,
));
bank_client
.send_message(&[&mint_keypair, &staker_keypair], message)
@@ -120,6 +120,7 @@ fn test_stake_account_delegate() {
// Test that we cannot withdraw staked lamports
let message = Message::new_with_payer(
vec![stake_instruction::withdraw(
&staker_pubkey,
&staker_pubkey,
&Pubkey::new_rand(),
1_000_000,
@@ -187,6 +188,7 @@ fn test_stake_account_delegate() {
// Deactivate the stake
let message = Message::new_with_payer(
vec![stake_instruction::deactivate_stake(
&staker_pubkey,
&staker_pubkey,
&vote_pubkey,
)],
@@ -199,6 +201,7 @@ fn test_stake_account_delegate() {
// Test that we cannot withdraw staked lamports due to cooldown period
let message = Message::new_with_payer(
vec![stake_instruction::withdraw(
&staker_pubkey,
&staker_pubkey,
&Pubkey::new_rand(),
1_000_000,
@@ -220,6 +223,7 @@ fn test_stake_account_delegate() {
let message = Message::new_with_payer(
vec![stake_instruction::withdraw(
&staker_pubkey,
&staker_pubkey,
&Pubkey::new_rand(),
1_000_000,
@@ -233,6 +237,7 @@ fn test_stake_account_delegate() {
let message = Message::new_with_payer(
vec![stake_instruction::withdraw(
&staker_pubkey,
&staker_pubkey,
&Pubkey::new_rand(),
250_000,
@@ -257,6 +262,7 @@ fn test_stake_account_delegate() {
// Test that we can withdraw now
let message = Message::new_with_payer(
vec![stake_instruction::withdraw(
&staker_pubkey,
&staker_pubkey,
&Pubkey::new_rand(),
750_000,