mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
ethdb/remotedb: fix error handling in Has/HasAncient
This commit is contained in:
parent
738b5a586e
commit
e25eab397e
1 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ type Database struct {
|
||||||
|
|
||||||
func (db *Database) Has(key []byte) (bool, error) {
|
func (db *Database) Has(key []byte) (bool, error) {
|
||||||
if _, err := db.Get(key); err != nil {
|
if _, err := db.Get(key); err != nil {
|
||||||
return false, nil
|
return false, err
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
@ -50,7 +50,7 @@ func (db *Database) Get(key []byte) ([]byte, error) {
|
||||||
|
|
||||||
func (db *Database) HasAncient(kind string, number uint64) (bool, error) {
|
func (db *Database) HasAncient(kind string, number uint64) (bool, error) {
|
||||||
if _, err := db.Ancient(kind, number); err != nil {
|
if _, err := db.Ancient(kind, number); err != nil {
|
||||||
return false, nil
|
return false, err
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue