Skip to content

Commit eaf73b5

Browse files
committed
miner: moved bad uncle logging to ridiculous log level. Closes bnb-chain#720
1 parent 5d2138a commit eaf73b5

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎logger/verbosity.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ const (
77
Core
88
Debug
99
Detail
10+
11+
Ridiculousness = 100
1012
)

‎miner/worker.go‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,11 @@ func (self *worker) commitNewWork() {
299299
}
300300

301301
if err := self.commitUncle(uncle.Header()); err != nil {
302-
glog.V(logger.Debug).Infof("Bad uncle found and will be removed (%x)\n", hash[:4])
303-
glog.V(logger.Debug).Infoln(uncle)
302+
if glog.V(logger.Ridiculousness) {
303+
glog.V(logger.Detail).Infof("Bad uncle found and will be removed (%x)\n", hash[:4])
304+
glog.V(logger.Detail).Infoln(uncle)
305+
}
306+
304307
badUncles = append(badUncles, hash)
305308
} else {
306309
glog.V(logger.Debug).Infof("commiting %x as uncle\n", hash[:4])

0 commit comments

Comments
 (0)