Skip to content

Commit

Permalink
Fix for index. (#4504)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frozen authored Sep 18, 2023
1 parent 0c981ff commit b798df0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/blockchain_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1682,8 +1682,8 @@ func (bc *BlockChainImpl) buildLeaderRotationMeta(curHeader *block.Header) error
return err
}
if curPubKey.Bytes != blockPubKey.Bytes || curHeader.Epoch().Uint64() != header.Epoch().Uint64() {
for j := i; i <= curHeader.NumberU64(); j++ {
header := bc.GetHeaderByNumber(i)
for j := i; j <= curHeader.NumberU64(); j++ {
header := bc.GetHeaderByNumber(j)
if header == nil {
return errors.New("header is nil")
}
Expand Down

0 comments on commit b798df0

Please sign in to comment.