Skip to content

Commit

Permalink
add consensus log (#314) (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
qizheng09 committed Jan 6, 2022
1 parent f31b190 commit eb62cb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bcs/consensus/xpoa/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ func (s *xpoaSchedule) GetLocalLeader(timestamp int64, round int64, storage []by
if blockPos < 0 || blockPos > s.blockNum || pos >= int64(len(localValidators)) {
return ""
}
s.log.Debug("xpoa schedule miner Scheduling", "pos", pos, "blockPos",
blockPos, "timestamp", timestamp, "validators", localValidators, "leader", localValidators[pos])
return localValidators[pos]
}

Expand All @@ -188,6 +190,7 @@ func (s *xpoaSchedule) getValidatesByBlockId(blockId []byte) ([]string, error) {
s.log.Error("Xpoa::getValidatesByBlockId::loadValidatorsMultiInfo error.", "err", err)
return nil, err
}
s.log.Debug("xpoaSchedule getValidatesByBlockId result", "validators", validators)
return validators, nil
}

Expand Down

0 comments on commit eb62cb5

Please sign in to comment.