mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
eth/filters: check reorgBlock in idempotent
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
7763574908
commit
6d0d8ac38a
1 changed files with 4 additions and 7 deletions
|
|
@ -380,14 +380,11 @@ func (api *FilterAPI) histLogs(notifier notifier, rpcSub *rpc.Subscription, from
|
|||
}
|
||||
continue
|
||||
}
|
||||
// TODO: if reorg occured in more than once?
|
||||
if reorgBlock == 0 {
|
||||
reorgBlock = logs[0].BlockNumber
|
||||
if reorgBlock <= delivered {
|
||||
logger.Info("Reorg detected", "reorgBlock", reorgBlock, "delivered", delivered)
|
||||
reorged = true
|
||||
}
|
||||
}
|
||||
if !reorged {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue