Skip to content

Commit

Permalink
fix(iota-genesis-builder): fixes #4896
Browse files Browse the repository at this point in the history
  • Loading branch information
miker83z committed Jan 17, 2025
1 parent 21e80f1 commit d566c6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/iota-genesis-builder/src/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ impl GenesisStake {
self.token_allocation.is_empty()
&& self.gas_coins_to_destroy.is_empty()
&& self.timelocks_to_destroy.is_empty()
&& self.timelocks_to_split.is_empty()
}

/// Calculate the total amount of token allocations.
Expand Down Expand Up @@ -197,9 +198,9 @@ impl GenesisStake {
target_stake_nanos,
&mut timelock_surplus,
);
if !timelock_allocation_objects.to_destroy.is_empty() {
if !timelock_allocation_objects.staked_with_timelock.is_empty() {
// Inside this block some timelock objects were picked from the pool; so we can
// save all the references to timelocks to destroy
// save all the references to timelocks to destroy, if there are any
self.timelocks_to_destroy
.append(&mut timelock_allocation_objects.to_destroy);
// Finally we create some token allocations based on timelock_allocation_objects
Expand Down

0 comments on commit d566c6c

Please sign in to comment.