mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 14:57:38 +02:00
itest: break remote signer into independent cases
So the test can run faster.
This commit is contained in:
@@ -508,10 +508,6 @@ var allTestCases = []*lntest.TestCase{
|
|||||||
Name: "async payments benchmark",
|
Name: "async payments benchmark",
|
||||||
TestFunc: testAsyncPayments,
|
TestFunc: testAsyncPayments,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Name: "remote signer",
|
|
||||||
TestFunc: testRemoteSigner,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Name: "taproot coop close",
|
Name: "taproot coop close",
|
||||||
TestFunc: testTaprootCoopClose,
|
TestFunc: testTaprootCoopClose,
|
||||||
@@ -695,4 +691,5 @@ func init() {
|
|||||||
allTestCases = append(allTestCases, multiHopForceCloseTestCases...)
|
allTestCases = append(allTestCases, multiHopForceCloseTestCases...)
|
||||||
allTestCases = append(allTestCases, watchtowerTestCases...)
|
allTestCases = append(allTestCases, watchtowerTestCases...)
|
||||||
allTestCases = append(allTestCases, psbtFundingTestCases...)
|
allTestCases = append(allTestCases, psbtFundingTestCases...)
|
||||||
|
allTestCases = append(allTestCases, remoteSignerTestCases...)
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,59 @@ import (
|
|||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// remoteSignerTestCases defines a set of test cases to run against the remote
|
||||||
|
// signer.
|
||||||
|
var remoteSignerTestCases = []*lntest.TestCase{
|
||||||
|
{
|
||||||
|
Name: "remote signer random seed",
|
||||||
|
TestFunc: testRemoteSignerRadomSeed,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer account import",
|
||||||
|
TestFunc: testRemoteSignerAccountImport,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer channel open",
|
||||||
|
TestFunc: testRemoteSignerChannelOpen,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer funding input types",
|
||||||
|
TestFunc: testRemoteSignerChannelFundingInputTypes,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer funding async payments",
|
||||||
|
TestFunc: testRemoteSignerAsyncPayments,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer funding async payments taproot",
|
||||||
|
TestFunc: testRemoteSignerAsyncPaymentsTaproot,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer shared key",
|
||||||
|
TestFunc: testRemoteSignerSharedKey,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer bump fee",
|
||||||
|
TestFunc: testRemoteSignerBumpFee,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer psbt",
|
||||||
|
TestFunc: testRemoteSignerPSBT,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer sign output raw",
|
||||||
|
TestFunc: testRemoteSignerSignOutputRaw,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer verify msg",
|
||||||
|
TestFunc: testRemoteSignerSignVerifyMsg,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "remote signer taproot",
|
||||||
|
TestFunc: testRemoteSignerTaproot,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
rootKey = "tprv8ZgxMBicQKsPe6jS4vDm2n7s42Q6MpvghUQqMmSKG7bTZvGKtjrcU3" +
|
rootKey = "tprv8ZgxMBicQKsPe6jS4vDm2n7s42Q6MpvghUQqMmSKG7bTZvGKtjrcU3" +
|
||||||
"PGzMNG37yzxywrcdvgkwrr8eYXJmbwdvUNVT4Ucv7ris4jvA7BUmg"
|
"PGzMNG37yzxywrcdvgkwrr8eYXJmbwdvUNVT4Ucv7ris4jvA7BUmg"
|
||||||
@@ -53,25 +106,115 @@ var (
|
|||||||
}}
|
}}
|
||||||
)
|
)
|
||||||
|
|
||||||
// testRemoteSigner tests that a watch-only wallet can use a remote signing
|
// remoteSignerTestCase defines a test case for the remote signer test suite.
|
||||||
// wallet to perform any signing or ECDH operations.
|
type remoteSignerTestCase struct {
|
||||||
func testRemoteSigner(ht *lntest.HarnessTest) {
|
name string
|
||||||
type testCase struct {
|
randomSeed bool
|
||||||
name string
|
sendCoins bool
|
||||||
randomSeed bool
|
commitType lnrpc.CommitmentType
|
||||||
sendCoins bool
|
fn func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode)
|
||||||
commitType lnrpc.CommitmentType
|
}
|
||||||
fn func(tt *lntest.HarnessTest,
|
|
||||||
wo, carol *node.HarnessNode)
|
// prepareRemoteSignerTest prepares a test case for the remote signer test
|
||||||
|
// suite by creating three nodes.
|
||||||
|
func prepareRemoteSignerTest(ht *lntest.HarnessTest, tc remoteSignerTestCase) (
|
||||||
|
*node.HarnessNode, *node.HarnessNode, *node.HarnessNode) {
|
||||||
|
|
||||||
|
// Signer is our signing node and has the wallet with the full master
|
||||||
|
// private key. We test that we can create the watch-only wallet from
|
||||||
|
// the exported accounts but also from a static key to make sure the
|
||||||
|
// derivation of the account public keys is correct in both cases.
|
||||||
|
password := []byte("itestpassword")
|
||||||
|
var (
|
||||||
|
signerNodePubKey = nodePubKey
|
||||||
|
watchOnlyAccounts = deriveCustomScopeAccounts(ht.T)
|
||||||
|
signer *node.HarnessNode
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if !tc.randomSeed {
|
||||||
|
signer = ht.RestoreNodeWithSeed(
|
||||||
|
"Signer", nil, password, nil, rootKey, 0, nil,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
signer = ht.NewNode("Signer", nil)
|
||||||
|
signerNodePubKey = signer.PubKeyStr
|
||||||
|
|
||||||
|
rpcAccts := signer.RPC.ListAccounts(
|
||||||
|
&walletrpc.ListAccountsRequest{},
|
||||||
|
)
|
||||||
|
|
||||||
|
watchOnlyAccounts, err = walletrpc.AccountsToWatchOnly(
|
||||||
|
rpcAccts.Accounts,
|
||||||
|
)
|
||||||
|
require.NoError(ht, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
subTests := []testCase{{
|
var commitArgs []string
|
||||||
|
if tc.commitType == lnrpc.CommitmentType_SIMPLE_TAPROOT {
|
||||||
|
commitArgs = lntest.NodeArgsForCommitType(
|
||||||
|
tc.commitType,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WatchOnly is the node that has a watch-only wallet and uses the
|
||||||
|
// Signer node for any operation that requires access to private keys.
|
||||||
|
watchOnly := ht.NewNodeRemoteSigner(
|
||||||
|
"WatchOnly", append([]string{
|
||||||
|
"--remotesigner.enable",
|
||||||
|
fmt.Sprintf(
|
||||||
|
"--remotesigner.rpchost=localhost:%d",
|
||||||
|
signer.Cfg.RPCPort,
|
||||||
|
),
|
||||||
|
fmt.Sprintf(
|
||||||
|
"--remotesigner.tlscertpath=%s",
|
||||||
|
signer.Cfg.TLSCertPath,
|
||||||
|
),
|
||||||
|
fmt.Sprintf(
|
||||||
|
"--remotesigner.macaroonpath=%s",
|
||||||
|
signer.Cfg.AdminMacPath,
|
||||||
|
),
|
||||||
|
}, commitArgs...),
|
||||||
|
password, &lnrpc.WatchOnly{
|
||||||
|
MasterKeyBirthdayTimestamp: 0,
|
||||||
|
MasterKeyFingerprint: nil,
|
||||||
|
Accounts: watchOnlyAccounts,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
resp := watchOnly.RPC.GetInfo()
|
||||||
|
require.Equal(ht, signerNodePubKey, resp.IdentityPubkey)
|
||||||
|
|
||||||
|
if tc.sendCoins {
|
||||||
|
ht.FundCoins(btcutil.SatoshiPerBitcoin, watchOnly)
|
||||||
|
ht.AssertWalletAccountBalance(
|
||||||
|
watchOnly, "default",
|
||||||
|
btcutil.SatoshiPerBitcoin, 0,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
carol := ht.NewNode("carol", commitArgs)
|
||||||
|
ht.EnsureConnected(watchOnly, carol)
|
||||||
|
|
||||||
|
return signer, watchOnly, carol
|
||||||
|
}
|
||||||
|
|
||||||
|
// testRemoteSignerRadomSeed tests that a watch-only wallet can use a remote
|
||||||
|
// signing wallet to perform any signing or ECDH operations.
|
||||||
|
func testRemoteSignerRadomSeed(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "random seed",
|
name: "random seed",
|
||||||
randomSeed: true,
|
randomSeed: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
// Nothing more to test here.
|
// Nothing more to test here.
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerAccountImport(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "account import",
|
name: "account import",
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runWalletImportAccountScenario(
|
runWalletImportAccountScenario(
|
||||||
@@ -79,25 +222,53 @@ func testRemoteSigner(ht *lntest.HarnessTest) {
|
|||||||
carol, wo,
|
carol, wo,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerChannelOpen(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "basic channel open close",
|
name: "basic channel open close",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runBasicChannelCreationAndUpdates(tt, wo, carol)
|
runBasicChannelCreationAndUpdates(tt, wo, carol)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerChannelFundingInputTypes(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "channel funding input types",
|
name: "channel funding input types",
|
||||||
sendCoins: false,
|
sendCoins: false,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runChannelFundingInputTypes(tt, carol, wo)
|
runChannelFundingInputTypes(tt, carol, wo)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerAsyncPayments(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "async payments",
|
name: "async payments",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runAsyncPayments(tt, wo, carol, nil)
|
runAsyncPayments(tt, wo, carol, nil)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerAsyncPaymentsTaproot(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "async payments taproot",
|
name: "async payments taproot",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
@@ -108,18 +279,39 @@ func testRemoteSigner(ht *lntest.HarnessTest) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
commitType: lnrpc.CommitmentType_SIMPLE_TAPROOT,
|
commitType: lnrpc.CommitmentType_SIMPLE_TAPROOT,
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerSharedKey(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "shared key",
|
name: "shared key",
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runDeriveSharedKey(tt, wo)
|
runDeriveSharedKey(tt, wo)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerBumpFee(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "bumpfee",
|
name: "bumpfee",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runBumpFee(tt, wo)
|
runBumpFee(tt, wo)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerPSBT(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "psbt",
|
name: "psbt",
|
||||||
randomSeed: true,
|
randomSeed: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
@@ -137,19 +329,40 @@ func testRemoteSigner(ht *lntest.HarnessTest) {
|
|||||||
// sure we can fund and then sign PSBTs from our wallet.
|
// sure we can fund and then sign PSBTs from our wallet.
|
||||||
runFundAndSignPsbt(ht, wo)
|
runFundAndSignPsbt(ht, wo)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerSignOutputRaw(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "sign output raw",
|
name: "sign output raw",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runSignOutputRaw(tt, wo)
|
runSignOutputRaw(tt, wo)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerSignVerifyMsg(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "sign verify msg",
|
name: "sign verify msg",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
fn: func(tt *lntest.HarnessTest, wo, carol *node.HarnessNode) {
|
||||||
runSignVerifyMessage(tt, wo)
|
runSignVerifyMessage(tt, wo)
|
||||||
},
|
},
|
||||||
}, {
|
}
|
||||||
|
|
||||||
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testRemoteSignerTaproot(ht *lntest.HarnessTest) {
|
||||||
|
tc := remoteSignerTestCase{
|
||||||
name: "taproot",
|
name: "taproot",
|
||||||
sendCoins: true,
|
sendCoins: true,
|
||||||
randomSeed: true,
|
randomSeed: true,
|
||||||
@@ -175,107 +388,10 @@ func testRemoteSigner(ht *lntest.HarnessTest) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}}
|
|
||||||
|
|
||||||
prepareTest := func(st *lntest.HarnessTest,
|
|
||||||
subTest testCase) (*node.HarnessNode,
|
|
||||||
*node.HarnessNode, *node.HarnessNode) {
|
|
||||||
|
|
||||||
// Signer is our signing node and has the wallet with the full
|
|
||||||
// master private key. We test that we can create the watch-only
|
|
||||||
// wallet from the exported accounts but also from a static key
|
|
||||||
// to make sure the derivation of the account public keys is
|
|
||||||
// correct in both cases.
|
|
||||||
password := []byte("itestpassword")
|
|
||||||
var (
|
|
||||||
signerNodePubKey = nodePubKey
|
|
||||||
watchOnlyAccounts = deriveCustomScopeAccounts(ht.T)
|
|
||||||
signer *node.HarnessNode
|
|
||||||
err error
|
|
||||||
)
|
|
||||||
if !subTest.randomSeed {
|
|
||||||
signer = st.RestoreNodeWithSeed(
|
|
||||||
"Signer", nil, password, nil, rootKey, 0, nil,
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
signer = st.NewNode("Signer", nil)
|
|
||||||
signerNodePubKey = signer.PubKeyStr
|
|
||||||
|
|
||||||
rpcAccts := signer.RPC.ListAccounts(
|
|
||||||
&walletrpc.ListAccountsRequest{},
|
|
||||||
)
|
|
||||||
|
|
||||||
watchOnlyAccounts, err = walletrpc.AccountsToWatchOnly(
|
|
||||||
rpcAccts.Accounts,
|
|
||||||
)
|
|
||||||
require.NoError(st, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
var commitArgs []string
|
|
||||||
if subTest.commitType == lnrpc.CommitmentType_SIMPLE_TAPROOT {
|
|
||||||
commitArgs = lntest.NodeArgsForCommitType(
|
|
||||||
subTest.commitType,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
// WatchOnly is the node that has a watch-only wallet and uses
|
|
||||||
// the Signer node for any operation that requires access to
|
|
||||||
// private keys.
|
|
||||||
watchOnly := st.NewNodeRemoteSigner(
|
|
||||||
"WatchOnly", append([]string{
|
|
||||||
"--remotesigner.enable",
|
|
||||||
fmt.Sprintf(
|
|
||||||
"--remotesigner.rpchost=localhost:%d",
|
|
||||||
signer.Cfg.RPCPort,
|
|
||||||
),
|
|
||||||
fmt.Sprintf(
|
|
||||||
"--remotesigner.tlscertpath=%s",
|
|
||||||
signer.Cfg.TLSCertPath,
|
|
||||||
),
|
|
||||||
fmt.Sprintf(
|
|
||||||
"--remotesigner.macaroonpath=%s",
|
|
||||||
signer.Cfg.AdminMacPath,
|
|
||||||
),
|
|
||||||
}, commitArgs...),
|
|
||||||
password, &lnrpc.WatchOnly{
|
|
||||||
MasterKeyBirthdayTimestamp: 0,
|
|
||||||
MasterKeyFingerprint: nil,
|
|
||||||
Accounts: watchOnlyAccounts,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
resp := watchOnly.RPC.GetInfo()
|
|
||||||
require.Equal(st, signerNodePubKey, resp.IdentityPubkey)
|
|
||||||
|
|
||||||
if subTest.sendCoins {
|
|
||||||
st.FundCoins(btcutil.SatoshiPerBitcoin, watchOnly)
|
|
||||||
ht.AssertWalletAccountBalance(
|
|
||||||
watchOnly, "default",
|
|
||||||
btcutil.SatoshiPerBitcoin, 0,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
carol := st.NewNode("carol", commitArgs)
|
|
||||||
st.EnsureConnected(watchOnly, carol)
|
|
||||||
|
|
||||||
return signer, watchOnly, carol
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, testCase := range subTests {
|
_, watchOnly, carol := prepareRemoteSignerTest(ht, tc)
|
||||||
subTest := testCase
|
tc.fn(ht, watchOnly, carol)
|
||||||
|
|
||||||
success := ht.Run(subTest.name, func(tt *testing.T) {
|
|
||||||
// Skip the cleanup here as no standby node is used.
|
|
||||||
st := ht.Subtest(tt)
|
|
||||||
|
|
||||||
_, watchOnly, carol := prepareTest(st, subTest)
|
|
||||||
subTest.fn(st, watchOnly, carol)
|
|
||||||
})
|
|
||||||
|
|
||||||
if !success {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// deriveCustomScopeAccounts derives the first 255 default accounts of the custom lnd
|
// deriveCustomScopeAccounts derives the first 255 default accounts of the custom lnd
|
||||||
|
Reference in New Issue
Block a user