mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
eth/tracers: live trace treat 0 as the initial offset
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
0099e5e2b8
commit
82ba95f5e3
1 changed files with 6 additions and 1 deletions
|
|
@ -174,7 +174,12 @@ func newLive(cfg json.RawMessage, stack tracers.LiveApiRegister, backend tracing
|
|||
}
|
||||
|
||||
latest := l.getFreezerTail()
|
||||
offset := latest - tail - frozen
|
||||
var offset uint64
|
||||
if latest == 0 {
|
||||
offset = 0
|
||||
} else {
|
||||
offset = latest - tail - frozen
|
||||
}
|
||||
log.Info("Open live tracer", "path", config.Path, "offset", offset, "tail", tail, "frozen", frozen, "latest", latest, "tables", tables)
|
||||
|
||||
// Initialize the latest block number as the sum of the tail, frozen, and offset
|
||||
|
|
|
|||
Loading…
Reference in a new issue