File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -207,11 +207,11 @@ type HistoricalStateReader struct {
207
207
// HistoricReader constructs a reader for accessing the requested historic state.
208
208
func (db * Database ) HistoricReader (root common.Hash ) (* HistoricalStateReader , error ) {
209
209
// Bail out if the state history hasn't been fully indexed
210
- if db .indexer == nil || ! db .indexer . inited () {
211
- return nil , errors . New ( " state histories haven't been fully indexed yet" )
210
+ if db .indexer == nil || db .freezer == nil {
211
+ return nil , fmt . Errorf ( "historical state %x is not available" , root )
212
212
}
213
- if db .freezer == nil {
214
- return nil , errors .New ("state histories are not available " )
213
+ if ! db .indexer . inited () {
214
+ return nil , errors .New ("state histories haven't been fully indexed yet " )
215
215
}
216
216
// States at the current disk layer or above are directly accessible via
217
217
// db.StateReader.
You can’t perform that action at this time.
0 commit comments