mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
resource leak
This commit is contained in:
parent
afa694e566
commit
f338516d50
1 changed files with 1 additions and 0 deletions
|
|
@ -303,6 +303,7 @@ func (db *Store) openEraFile(epoch uint64) (*era.Era, error) {
|
||||||
}
|
}
|
||||||
// Sanity-check start block.
|
// Sanity-check start block.
|
||||||
if e.Start()%uint64(era.MaxEra1Size) != 0 {
|
if e.Start()%uint64(era.MaxEra1Size) != 0 {
|
||||||
|
e.Close()
|
||||||
return nil, fmt.Errorf("pre-merge era1 file has invalid boundary. %d %% %d != 0", e.Start(), era.MaxEra1Size)
|
return nil, fmt.Errorf("pre-merge era1 file has invalid boundary. %d %% %d != 0", e.Start(), era.MaxEra1Size)
|
||||||
}
|
}
|
||||||
log.Debug("Opened era1 file", "epoch", epoch)
|
log.Debug("Opened era1 file", "epoch", epoch)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue