File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -824,16 +824,15 @@ impl Consensus {
824
824
epoch_duration_in_milliseconds,
825
825
} => {
826
826
if self . permanent_difficulty ( ) {
827
+ let next_epoch_length = ( self . epoch_duration_target ( ) + MIN_BLOCK_INTERVAL
828
+ - 1 )
829
+ / MIN_BLOCK_INTERVAL ;
827
830
let primary_epoch_reward =
828
831
self . primary_epoch_reward_of_next_epoch ( & epoch) . as_u64 ( ) ;
829
832
let block_reward =
830
- Capacity :: shannons ( primary_epoch_reward / epoch . length ( ) ) ;
833
+ Capacity :: shannons ( primary_epoch_reward / next_epoch_length ) ;
831
834
let remainder_reward =
832
- Capacity :: shannons ( primary_epoch_reward % epoch. length ( ) ) ;
833
-
834
- let next_epoch_length = ( self . epoch_duration_target ( ) + MIN_BLOCK_INTERVAL
835
- - 1 )
836
- / MIN_BLOCK_INTERVAL ;
835
+ Capacity :: shannons ( primary_epoch_reward % next_epoch_length) ;
837
836
838
837
let dummy_epoch_ext = epoch
839
838
. clone ( )
You can’t perform that action at this time.
0 commit comments