mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 02:10:46 +00:00
miner: fix overflow when compare block number (#1895)
This commit is contained in:
parent
1886219894
commit
adcc0d3652
1 changed files with 1 additions and 1 deletions
|
|
@ -1021,7 +1021,7 @@ func (w *Work) commitTransactions(mux *event.TypeMux, balanceFee map[common.Addr
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
blkNumber := binary.BigEndian.Uint64(data[8:40])
|
blkNumber := binary.BigEndian.Uint64(data[8:40])
|
||||||
if blkNumber >= w.header.Number.Uint64() || blkNumber <= w.header.Number.Uint64()-w.config.XDPoS.Epoch*2 {
|
if blkNumber >= w.header.Number.Uint64() || blkNumber+w.config.XDPoS.Epoch*2 <= w.header.Number.Uint64() {
|
||||||
log.Trace("Data special transaction invalid number", "hash", hash, "blkNumber", blkNumber, "miner", w.header.Number)
|
log.Trace("Data special transaction invalid number", "hash", hash, "blkNumber", blkNumber, "miner", w.header.Number)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue