Skip to content

Commit

Permalink
fix +1 (#4251)
Browse files Browse the repository at this point in the history
Co-authored-by: Konstantin <[email protected]>
  • Loading branch information
Frozen and Konstantin authored Jul 29, 2022
1 parent 93b14dd commit f8777e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/blockchain_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,13 @@ func (bc *BlockChainImpl) SuperCommitteeForNextEpoch(
}
} else {
//propose
beaconEpoch = beacon.CurrentHeader().Epoch()
h := beacon.CurrentHeader()
if h.IsLastBlockInEpoch() {
beaconEpoch = beacon.CurrentHeader().Epoch()
beaconEpoch = beaconEpoch.Add(beaconEpoch, common.Big1)
} else {
beaconEpoch = beacon.CurrentHeader().Epoch()
}
}
utils.Logger().Debug().Msgf("[SuperCommitteeCalculation] isVerify: %+v, realBeaconEpoch:%+v, beaconEpoch: %+v, headerEpoch:%+v, shardStateEpoch:%+v",
isVerify, beacon.CurrentHeader().Epoch(), beaconEpoch, header.Epoch(), shardState.Epoch)
Expand Down

0 comments on commit f8777e0

Please sign in to comment.