Skip to content

Commit

Permalink
fix(stakes): add validator and withdrawer to StakeEntry upon creation
Browse files Browse the repository at this point in the history
  • Loading branch information
drcpu-github committed Oct 30, 2024
1 parent 782c980 commit f16c2b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data_structures/src/staking/stakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ where
..Default::default()
}));

if !stake_found {
stake.key.write()?.validator = key.validator.clone();
stake.key.write()?.withdrawer = key.withdrawer.clone();
}

// Actually increase the number of coins
stake
.value
Expand Down

0 comments on commit f16c2b8

Please sign in to comment.