Skip to content

Commit

Permalink
app/ledger/finalize_block: slash after copying of validator sets
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Mar 23, 2023
1 parent 3eeaf4f commit 08fb1d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ where
)?;
}

// Invariant: This has to be applied after
// `copy_validator_sets_and_positions` if we're starting a new epoch
self.slash();

let wrapper_fees = self.get_wrapper_tx_fees();
let mut stats = InternalStats::default();

Expand Down Expand Up @@ -404,8 +408,6 @@ where
.wl_storage
.update_epoch(height, header_time)
.expect("Must be able to update epoch");

self.slash();
(height, new_epoch)
}

Expand Down

0 comments on commit 08fb1d2

Please sign in to comment.