Skip to content

Commit 82363f8

Browse files
committed
add debug log
1 parent 9aeecc5 commit 82363f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

consensus/system_contract/consensus.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,11 @@ func (s *SystemContract) Prepare(chain consensus.ChainHeaderReader, header *type
258258
return consensus.ErrUnknownAncestor
259259
}
260260
if timeOverride != nil {
261-
log.Info("hhf debug..........")
262261
header.Time = *timeOverride
263262
} else {
264263
header.Time = s.CalcTimestamp(parent)
265264
}
266-
265+
log.Info("Preparing header", "number", header.Number, "time", time.Unix(int64(header.Time), 0).Format(time.RFC3339))
267266
// Difficulty must be 1
268267
header.Difficulty = big.NewInt(1)
269268

miner/scroll_worker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ func (w *worker) newWork(now time.Time, parent *types.Block, reorging bool, reor
554554
vmConfig.Tracer = cccLogger
555555
}
556556
deadline := time.Unix(int64(header.Time), 0)
557+
log.Info("the new work deadline", "deadline", deadline, "headerTime", header.Time, "headerNumber", header.Number)
557558
if w.chainConfig.Clique != nil && w.chainConfig.Clique.RelaxedPeriod {
558559
// clique with relaxed period uses time.Now() as the header.Time, calculate the deadline
559560
deadline = time.Unix(int64(header.Time+w.chainConfig.Clique.Period), 0)

0 commit comments

Comments
 (0)