mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-21 05:26:46 +00:00
Fix NewestSha.
This commit is contained in:
parent
96f7305c29
commit
66d6f10d5d
@ -253,9 +253,7 @@ func (db *LevelDb) NewestSha() (rsha *btcwire.ShaHash, rblkid int64, err error)
|
|||||||
defer db.dbLock.Unlock()
|
defer db.dbLock.Unlock()
|
||||||
|
|
||||||
if db.lastBlkIdx == -1 {
|
if db.lastBlkIdx == -1 {
|
||||||
rblkid = db.lastBlkIdx
|
return &btcwire.ShaHash{}, -1, nil
|
||||||
err = fmt.Errorf("Empty Database")
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
sha := db.lastBlkSha
|
sha := db.lastBlkSha
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user