Skip to content

Commit dcf71b0

Browse files
committed
fix(stakes): add validator and withdrawer to StakeEntry upon creation
1 parent dcf01aa commit dcf71b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

data_structures/src/staking/stakes.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ where
166166
..Default::default()
167167
}));
168168

169+
if !stake_found {
170+
stake.key.write()?.validator = key.validator.clone();
171+
stake.key.write()?.withdrawer = key.withdrawer.clone();
172+
}
173+
169174
// Actually increase the number of coins
170175
stake
171176
.value

0 commit comments

Comments
 (0)