eth, light: minor light client startup cleanups

This commit is contained in:
Péter Szilágyi
2018-02-08 07:49:23 +02:00
parent 55599ee95d
commit eb07dbb079
4 changed files with 4 additions and 9 deletions

View File

@ -58,17 +58,14 @@ func GetHeaderByNumber(ctx context.Context, odr OdrBackend, number uint64) (*typ
}
}
}
if number >= chtCount*ChtFrequency {
return nil, ErrNoTrustedCht
}
r := &ChtRequest{ChtRoot: GetChtRoot(db, chtCount-1, sectionHead), ChtNum: chtCount - 1, BlockNum: number}
if err := odr.Retrieve(ctx, r); err != nil {
return nil, err
} else {
return r.Header, nil
}
return r.Header, nil
}
func GetCanonicalHash(ctx context.Context, odr OdrBackend, number uint64) (common.Hash, error) {