diff --git a/createtx_test.go b/createtx_test.go index 583dd59..d1d3d6d 100644 --- a/createtx_test.go +++ b/createtx_test.go @@ -17,7 +17,7 @@ func TestFakeTxs(t *testing.T) { t.Errorf("Can not create encrypted wallet: %s", err) return } - btcw := &BtcWallet{ + btcw := &Account{ Wallet: w, } diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index fd01074..7cf530b 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -32,10 +32,16 @@ func TestBtcAddressSerializer(t *testing.T) { mem: 1024, nIter: 5, } - rand.Read(kdfp.salt[:]) + if _, err := rand.Read(kdfp.salt[:]); err != nil { + t.Error(err.Error()) + return + } key := Key([]byte("banana"), kdfp) privKey := make([]byte, 32) - rand.Read(privKey) + if _, err := rand.Read(privKey); err != nil { + t.Error(err.Error()) + return + } addr, err := newBtcAddress(privKey, nil, &BlockStamp{}) if err != nil { t.Error(err.Error())