From eb62cb5b9107a43b3f28e772cb19ddb5ed01d7b3 Mon Sep 17 00:00:00 2001 From: ZhengQi Date: Thu, 6 Jan 2022 21:51:37 +0800 Subject: [PATCH] add consensus log (#314) (#315) --- bcs/consensus/xpoa/schedule.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bcs/consensus/xpoa/schedule.go b/bcs/consensus/xpoa/schedule.go index 31ca35d0..a200a365 100644 --- a/bcs/consensus/xpoa/schedule.go +++ b/bcs/consensus/xpoa/schedule.go @@ -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] } @@ -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 }