mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
core/rawdb: fix read error
This commit is contained in:
parent
65baef9e0e
commit
e6ba338d50
1 changed files with 3 additions and 3 deletions
|
|
@ -400,8 +400,8 @@ func (t *freezerTable) repairIndex() error {
|
|||
}
|
||||
size := stat.Size()
|
||||
|
||||
// Move the read cursor to the beginning of the file.
|
||||
_, err = t.index.Seek(0, 0)
|
||||
// Move the read cursor to the beginning of the file
|
||||
_, err = t.index.Seek(0, io.SeekStart)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -414,7 +414,7 @@ func (t *freezerTable) repairIndex() error {
|
|||
head indexEntry
|
||||
|
||||
read = func() (indexEntry, error) {
|
||||
n, err := fr.Read(buff)
|
||||
n, err := io.ReadFull(fr, buff)
|
||||
if err != nil {
|
||||
return indexEntry{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue