Skip to content

Commit a20a21c

Browse files
committed
miner: fix overflow when compare block number
1 parent 2a56ecc commit a20a21c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miner/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ func (w *Work) commitTransactions(mux *event.TypeMux, balanceFee map[common.Addr
991991
continue
992992
}
993993
blkNumber := binary.BigEndian.Uint64(data[8:40])
994-
if blkNumber >= w.header.Number.Uint64() || blkNumber <= w.header.Number.Uint64()-w.config.XDPoS.Epoch*2 {
994+
if blkNumber >= w.header.Number.Uint64() || blkNumber+w.config.XDPoS.Epoch*2 <= w.header.Number.Uint64() {
995995
log.Trace("Data special transaction invalid number", "hash", hash, "blkNumber", blkNumber, "miner", w.header.Number)
996996
continue
997997
}

0 commit comments

Comments
 (0)