Fix NewestSha.
This commit is contained in:
parent
96f7305c29
commit
66d6f10d5d
1 changed files with 1 additions and 3 deletions
|
@ -253,9 +253,7 @@ func (db *LevelDb) NewestSha() (rsha *btcwire.ShaHash, rblkid int64, err error)
|
|||
defer db.dbLock.Unlock()
|
||||
|
||||
if db.lastBlkIdx == -1 {
|
||||
rblkid = db.lastBlkIdx
|
||||
err = fmt.Errorf("Empty Database")
|
||||
return
|
||||
return &btcwire.ShaHash{}, -1, nil
|
||||
}
|
||||
sha := db.lastBlkSha
|
||||
|
||||
|
|
Loading…
Reference in a new issue