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

Fix stake redelegate#13358

Merged
mergify[bot] merged 2 commits intosolana-labs:masterfrom
t-nelson:fix-stake-redelegate
Nov 6, 2020
Merged

Fix stake redelegate#13358
mergify[bot] merged 2 commits intosolana-labs:masterfrom
t-nelson:fix-stake-redelegate

Conversation

@t-nelson
Copy link
Copy Markdown
Contributor

@t-nelson t-nelson commented Nov 3, 2020

Problem

Re-delegating a formerly delegated, but currently deactivated stake account, does not consider changes to the account balance

Summary of Changes

Use the current account balance rather than the previous delegation amount

WIP until activation is coordinated with #13357

@t-nelson
Copy link
Copy Markdown
Contributor Author

t-nelson commented Nov 3, 2020

Do you have time to take a peek at one more, @rwalker-com? 🙏

Comment thread programs/stake/src/stake_state.rs Outdated
Comment thread programs/stake/src/stake_state.rs Outdated
Copy link
Copy Markdown
Contributor

@rwalker-com rwalker-com left a comment

Choose a reason for hiding this comment

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

great job closing a hole you can throw a cat through

CriesofCarrots
CriesofCarrots previously approved these changes Nov 3, 2020
Copy link
Copy Markdown
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

I'll take another look when you push your test changes, but fix lgtm!
It'll be good to get another winky comment in the code base as well ;)

@t-nelson t-nelson force-pushed the fix-stake-redelegate branch from 095700c to 95b0d83 Compare November 3, 2020 05:10
@mergify mergify Bot dismissed CriesofCarrots’s stale review November 3, 2020 05:10

Pull request has been modified.

@t-nelson
Copy link
Copy Markdown
Contributor Author

t-nelson commented Nov 3, 2020

Review's been addressed!

@t-nelson t-nelson added v1.3 work in progress This isn't quite right yet labels Nov 3, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 3, 2020

Codecov Report

Merging #13358 (87d661f) into master (d08c323) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #13358   +/-   ##
=======================================
  Coverage    82.0%    82.0%           
=======================================
  Files         378      378           
  Lines       89990    90037   +47     
=======================================
+ Hits        73862    73914   +52     
+ Misses      16128    16123    -5     

@CriesofCarrots
Copy link
Copy Markdown
Contributor

This will need rebasing on #13394 (make sure it goes in stake_state.rs, as opposed to the legacy mod)

@t-nelson t-nelson force-pushed the fix-stake-redelegate branch from 95b0d83 to 87d661f Compare November 6, 2020 17:35
@t-nelson
Copy link
Copy Markdown
Contributor Author

t-nelson commented Nov 6, 2020

Rebased on #13394

@t-nelson t-nelson added automerge Merge this Pull Request automatically once CI passes and removed work in progress This isn't quite right yet labels Nov 6, 2020
@mergify mergify Bot merged commit fe1e08b into solana-labs:master Nov 6, 2020
mergify Bot added a commit that referenced this pull request Nov 6, 2020
* stake: Add redelegation failing test

(cherry picked from commit 491ad59)

* stake: Consider withdraws we redelegating

(cherry picked from commit fe1e08b)

Co-authored-by: Trent Nelson <trent@solana.com>
mergify Bot added a commit that referenced this pull request Nov 6, 2020
* stake: Add redelegation failing test

(cherry picked from commit 491ad59)

* stake: Consider withdraws we redelegating

(cherry picked from commit fe1e08b)

Co-authored-by: Trent Nelson <trent@solana.com>
@t-nelson t-nelson deleted the fix-stake-redelegate branch November 6, 2020 21:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge Merge this Pull Request automatically once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants