Compare commits

...
Author SHA1 Message Date
prathamesh0 fd19af396d Log key on db misses (#45) 2022-08-23 12:14:42 +05:30
Michael b706c596c5 Merge pull request #44 from vulcanize/geth1.10.21-update-wip
Exchange.Interface no longer IsOnline and other updates for blockserv…
2022-08-01 17:06:21 -04:00
Michael 963053f23e Merge pull request #43 from vulcanize/geth1.10.21-update-wip
updating go.mod to depend on vulcanize fork of geth to avoid divergin…
2022-08-01 16:15:37 -04:00
Michael 4a40d2b14e Merge pull request #42 from vulcanize/geth1.10.21-update-wip
go mod and sum updated for geth 1.10.21
2022-07-29 15:01:21 -04:00
+8 -1
View File
@@ -18,6 +18,7 @@ package pgipfsethdb
import (
"context"
"database/sql"
"errors"
"fmt"
"math/big"
@@ -28,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/jmoiron/sqlx"
"github.com/mailgun/groupcache/v2"
log "github.com/sirupsen/logrus"
)
var errNotSupported = errors.New("this operation is not supported")
@@ -113,7 +115,12 @@ func (d *Database) Has(key []byte) (bool, error) {
// Get retrieves the given key if it's present in the key-value data store
func (d *Database) dbGet(key string) ([]byte, error) {
var data []byte
return data, d.db.Get(&data, getPgStr, key)
err := d.db.Get(&data, getPgStr, key)
if err == sql.ErrNoRows {
log.Warn("Database miss for key", key)
}
return data, err
}
// Get satisfies the ethdb.KeyValueReader interface