mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core/filtermaps: fixed tail unindexing condition for epoch 0
This commit is contained in:
parent
d7770b3102
commit
b919bf009b
1 changed files with 6 additions and 4 deletions
|
|
@ -356,15 +356,17 @@ func (f *FilterMaps) needTailEpoch(epoch uint32) bool {
|
||||||
if epoch+1 < firstEpoch {
|
if epoch+1 < firstEpoch {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
var lastBlockOfPrevEpoch uint64
|
||||||
if epoch > 0 {
|
if epoch > 0 {
|
||||||
lastBlockOfPrevEpoch, _, err := f.getLastBlockOfMap(epoch<<f.logMapsPerEpoch - 1)
|
var err error
|
||||||
|
lastBlockOfPrevEpoch, _, err = f.getLastBlockOfMap(epoch<<f.logMapsPerEpoch - 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Could not get last block of previous epoch", "epoch", epoch-1, "error", err)
|
log.Error("Could not get last block of previous epoch", "epoch", epoch-1, "error", err)
|
||||||
return epoch >= firstEpoch
|
return epoch >= firstEpoch
|
||||||
}
|
}
|
||||||
if f.historyCutoff > lastBlockOfPrevEpoch {
|
}
|
||||||
return false
|
if f.historyCutoff > lastBlockOfPrevEpoch {
|
||||||
}
|
return false
|
||||||
}
|
}
|
||||||
lastBlockOfEpoch, _, err := f.getLastBlockOfMap((epoch+1)<<f.logMapsPerEpoch - 1)
|
lastBlockOfEpoch, _, err := f.getLastBlockOfMap((epoch+1)<<f.logMapsPerEpoch - 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue