Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Cli: Restore withdraw-from-vote-account ALL behavior#21854

Merged
CriesofCarrots merged 1 commit intosolana-labs:masterfrom
CriesofCarrots:fix-cli-vote-withdraw-all
Dec 14, 2021
Merged

Cli: Restore withdraw-from-vote-account ALL behavior#21854
CriesofCarrots merged 1 commit intosolana-labs:masterfrom
CriesofCarrots:fix-cli-vote-withdraw-all

Conversation

@CriesofCarrots
Copy link
Copy Markdown
Contributor

@CriesofCarrots CriesofCarrots commented Dec 13, 2021

Problem

#21579 used existing apis to implement offline handling. However, this broke the ALL special case in solana withdraw-from-vote-account.

Summary of Changes

  • Restore ALL behavior, by adding SpendAmount::RentExempt variant (makes this subcommand's behavior clearer, and might be useful for other cli subcommands in the future)
  • Add comments and help text to distinguish ALL behavior that is inconsistent from other cli subcommands

Fixes #21815

This needs to be backported to v1.8, if/when #21648 gets un-reverted

Comment thread cli/src/vote.rs
destination_account_pubkey: pubkey,
withdraw_authority: 0,
withdraw_amount: SpendAmount::All,
withdraw_amount: SpendAmount::RentExempt,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This difference gets called out explicitly now

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 14, 2021

Codecov Report

Merging #21854 (d3d3bd5) into master (5a28f61) will decrease coverage by 0.0%.
The diff coverage is 35.0%.

@@            Coverage Diff            @@
##           master   #21854     +/-   ##
=========================================
- Coverage    81.3%    81.3%   -0.1%     
=========================================
  Files         516      516             
  Lines      144185   144206     +21     
=========================================
+ Hits       117237   117250     +13     
- Misses      26948    26956      +8     

@CriesofCarrots CriesofCarrots merged commit bed1b14 into solana-labs:master Dec 14, 2021
mergify Bot pushed a commit that referenced this pull request Dec 14, 2021
mergify Bot added a commit that referenced this pull request Dec 14, 2021
…ke behavior clearer (#21854) (#21863)

(cherry picked from commit bed1b14)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
CriesofCarrots added a commit to CriesofCarrots/solana that referenced this pull request Dec 16, 2021
CriesofCarrots added a commit that referenced this pull request Dec 17, 2021
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
@CriesofCarrots CriesofCarrots deleted the fix-cli-vote-withdraw-all branch February 26, 2022 21:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.9.0: vote-account ceased to exist after upgrade

2 participants