Skip to content

Commit 529337a

Browse files
committed
Fixed the block not found issue
1 parent ff789f0 commit 529337a

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

database/ldb/dblock.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,7 @@ func (db *LevelDb) FetchHeightRange(startHeight, endHeight int64) (rshalist []wi
179179
// part of the database.Db interface implementation.
180180
func (db *LevelDb) FetchBlockHeightBySha(sha *wire.ShaHash) (int64, error) {
181181

182-
dblk, err := db.FetchDBlockByHash(sha.ToFactomHash())
183-
if err != nil {
184-
return 0, err
185-
}
182+
dblk, _ := db.FetchDBlockByHash(sha.ToFactomHash())
186183

187184
var height int64 = -1
188185
if dblk != nil {
@@ -243,10 +240,7 @@ func (db *LevelDb) FetchDBlockByHash(dBlockHash *common.Hash) (*common.Directory
243240

244241
var key []byte = []byte{byte(TBL_DB)}
245242
key = append(key, dBlockHash.Bytes()...)
246-
data, err := db.lDb.Get(key, db.ro)
247-
if err != nil {
248-
return nil, err
249-
}
243+
data, _ := db.lDb.Get(key, db.ro)
250244

251245
dBlock := common.NewDBlock()
252246
if data == nil {

0 commit comments

Comments
 (0)