You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This panic stems from this line trying to write the height of the final block when moving to a new file. The reason for the panic is because curFile.file is nil.
// Open the current file if needed. This will typically only be the
// case when moving to the next file to write to or on initial database
// load. However, it might also be the case if rollbacks happened after
// file writes started during a transaction commit.
if wc.curFile.file == nil {
file, err := s.openWriteFileFunc(wc.curFileNum)
if err != nil {
return blockLocation{}, err
}
wc.curFile.file = file
}
It seems it may be possible that it's trying to load curFile.file before it was set. Possibly an edge case where the first block to be processed on startup is creating a new block file?
Duplicating the above code block right before L433 appears to have got past the error though it's unclear if this is correct code wise.
The text was updated successfully, but these errors were encountered:
This panic stems from this line trying to write the height of the final block when moving to a new file. The reason for the panic is because
curFile.file
is nil.https://github.com/gcash/bchd/blob/master/database/ffldb/blockio.go#L433
Later on in this function we have:
It seems it may be possible that it's trying to load
curFile.file
before it was set. Possibly an edge case where the first block to be processed on startup is creating a new block file?Duplicating the above code block right before L433 appears to have got past the error though it's unclear if this is correct code wise.
The text was updated successfully, but these errors were encountered: