Correct test for zero hash versus nil on empty db.
This commit is contained in:
parent
adc73cbc9d
commit
d9404fe880
1 changed files with 2 additions and 2 deletions
|
@ -6,6 +6,7 @@ package ldb_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcdb"
|
"github.com/conformal/btcdb"
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
@ -34,8 +35,7 @@ func TestEmptyDB(t *testing.T) {
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
sha, height, err := db.NewestSha()
|
sha, height, err := db.NewestSha()
|
||||||
|
if !sha.IsEqual(&btcwire.ShaHash{}) {
|
||||||
if sha != nil {
|
|
||||||
t.Errorf("sha not nil")
|
t.Errorf("sha not nil")
|
||||||
}
|
}
|
||||||
if height != -1 {
|
if height != -1 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue