Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stake::split() via create_account_with_seed() #7785

Closed

Conversation

rob-solana
Copy link
Contributor

Problem

stake::split() into an account with a _with_seed() address isn't part of
the stake_instruction API, so must be hand-rolled.

Summary of Changes

add the API to get that instruction vector
note: depends on #7776

Fixes #

@rob-solana
Copy link
Contributor Author

rob-solana commented Jan 14, 2020

split() is special, in the ideal case:

  • there's no transfer, except among stake accounts
  • it requires only one signature: the authorized staker (implies the fee payer is the authorized staker)

So, the split() destination account needs to:

  • wink into existence (potentially with zero lamports)
  • get initialized

implies support for a "create account with no transfer" message constructor (is part of #7776 )

@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #7785 into master will increase coverage by <.1%.
The diff coverage is 90.9%.

@@           Coverage Diff            @@
##           master   #7785     +/-   ##
========================================
+ Coverage    81.8%   81.8%   +<.1%     
========================================
  Files         238     241      +3     
  Lines       50993   51080     +87     
========================================
+ Hits        41730   41830    +100     
+ Misses       9263    9250     -13

@rob-solana rob-solana closed this Jan 16, 2020
@rob-solana rob-solana deleted the Add-split-with-seed-part-2 branch January 16, 2020 23:49
@rob-solana rob-solana restored the Add-split-with-seed-part-2 branch January 16, 2020 23:50
@rob-solana rob-solana deleted the Add-split-with-seed-part-2 branch January 20, 2020 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants