Skip to content

Commit

Permalink
apps/shell/finalize_block: remove first epoch workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Oct 18, 2023
1 parent 6fb1984 commit d05284e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,8 @@ where
.pred_epochs
.first_block_heights[last_epoch.0 as usize]
.0;
let num_blocks_in_last_epoch = if first_block_of_last_epoch == 0 {
self.wl_storage.storage.block.height.0 - 1
} else {
self.wl_storage.storage.block.height.0 - first_block_of_last_epoch
};
let num_blocks_in_last_epoch =
self.wl_storage.storage.block.height.0 - first_block_of_last_epoch;

// Read the rewards accumulator and calculate the new rewards products
// for the previous epoch
Expand Down

0 comments on commit d05284e

Please sign in to comment.