Skip to content

Commit

Permalink
fix: dummy block reward
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsoledad committed Nov 10, 2023
1 parent 8215a2f commit ce66490
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions spec/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,16 +824,15 @@ impl Consensus {
epoch_duration_in_milliseconds,
} => {
if self.permanent_difficulty() {
let next_epoch_length = (self.epoch_duration_target() + MIN_BLOCK_INTERVAL
- 1)
/ MIN_BLOCK_INTERVAL;
let primary_epoch_reward =
self.primary_epoch_reward_of_next_epoch(&epoch).as_u64();
let block_reward =
Capacity::shannons(primary_epoch_reward / epoch.length());
Capacity::shannons(primary_epoch_reward / next_epoch_length);
let remainder_reward =
Capacity::shannons(primary_epoch_reward % epoch.length());

let next_epoch_length = (self.epoch_duration_target() + MIN_BLOCK_INTERVAL
- 1)
/ MIN_BLOCK_INTERVAL;
Capacity::shannons(primary_epoch_reward % next_epoch_length);

let dummy_epoch_ext = epoch
.clone()
Expand Down

0 comments on commit ce66490

Please sign in to comment.