mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
capture error
This commit is contained in:
parent
ebc7dc9e37
commit
2b8d317518
1 changed files with 4 additions and 3 deletions
|
|
@ -1196,8 +1196,7 @@ func (t *freezerTable) sizeNolock() (uint64, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// advanceHead should be called when the current head file would outgrow the file limits,
|
// advanceHead should be called when the current head file would outgrow the file limits,
|
||||||
// and a new file must be opened. The caller of this method must hold the write-lock
|
// and a new file must be opened. This method acquires the write-lock internally.
|
||||||
// before calling this method.
|
|
||||||
func (t *freezerTable) advanceHead() error {
|
func (t *freezerTable) advanceHead() error {
|
||||||
t.lock.Lock()
|
t.lock.Lock()
|
||||||
defer t.lock.Unlock()
|
defer t.lock.Unlock()
|
||||||
|
|
@ -1218,7 +1217,9 @@ func (t *freezerTable) advanceHead() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
t.releaseFile(t.headId)
|
t.releaseFile(t.headId)
|
||||||
t.openFile(t.headId, openFreezerFileForReadOnly)
|
if _, err := t.openFile(t.headId, openFreezerFileForReadOnly); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Swap out the current head.
|
// Swap out the current head.
|
||||||
t.head = newHead
|
t.head = newHead
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue