multi: move many t.Fatalf calls to require.NoError
This commit is contained in:
1 parent
9e6f0ef46b
commit
9a10c80bcb
92 files changed
+1905
-5565
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtdb"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -35,9 +36,7 @@ func randAddr(t *testing.T) net.Addr {
|
||||
|
||||
func randTower(t *testing.T) *wtdb.Tower {
|
||||
priv, err := btcec.NewPrivateKey()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create private key: %v", err)
|
||||
}
|
||||
require.NoError(t, err, "unable to create private key")
|
||||
pubKey := priv.PubKey()
|
||||
return &wtdb.Tower{
|
||||
ID: wtdb.TowerID(rand.Uint64()),
|
||||
|
||||
Reference in new issue
Block a user