From 55cf6c3b222c8bee649ece1a39938d2525b32c91 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 27 May 2014 18:22:03 -0500 Subject: [PATCH] Fix tests. --- wallet/wallet_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index 02f20ba..2fe7839 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -717,7 +717,10 @@ func TestWatchingWalletExport(t *testing.T) { return } pk, _ := btcec.PrivKeyFromBytes(btcec.S256(), make([]byte, 32)) - wif := btcutil.NewWIF(pk, tstNetParams, true) + wif, err := btcutil.NewWIF(pk, tstNetParams, true) + if err != nil { + t.Fatal(err) + } if _, err := ww.ImportPrivateKey(wif, createdAt); err != ErrWalletIsWatchingOnly { t.Errorf("Nonsensical func ImportPrivateKey returned no or incorrect error: %v", err) return @@ -758,7 +761,10 @@ func TestImportPrivateKey(t *testing.T) { } // import priv key - wif := btcutil.NewWIF((*btcec.PrivateKey)(pk), tstNetParams, false) + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), tstNetParams, false) + if err != nil { + t.Fatal(err) + } importHeight := int32(50) importedAt := &BlockStamp{Height: importHeight} address, err := w.ImportPrivateKey(wif, importedAt)