Skip to content

Commit 09bd0cc

Browse files
authored
Merge pull request #1668 from lightninglabs/wip/refactor-add-package-lndservices
Refactor: move LND-related services into new `lndservices` package
2 parents f93cd77 + f317afd commit 09bd0cc

18 files changed

+915
-845
lines changed

config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/lightninglabs/lndclient"
1010
"github.com/lightninglabs/taproot-assets/address"
1111
"github.com/lightninglabs/taproot-assets/authmailbox"
12+
"github.com/lightninglabs/taproot-assets/lndservices"
1213
"github.com/lightninglabs/taproot-assets/monitoring"
1314
"github.com/lightninglabs/taproot-assets/proof"
1415
"github.com/lightninglabs/taproot-assets/rfq"
@@ -189,7 +190,7 @@ type Config struct {
189190

190191
// FsmDaemonAdapters is a set of adapters that allow a state machine to
191192
// interact with external daemons.
192-
FsmDaemonAdapters *LndFsmDaemonAdapters
193+
FsmDaemonAdapters *lndservices.LndFsmDaemonAdapters
193194

194195
// SupplyCommitManager is a service that is used to manage supply
195196
// commitments for assets. Supply commitments are issuer published

itest/mint_fund_seal_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"github.com/lightninglabs/taproot-assets/asset"
2020
"github.com/lightninglabs/taproot-assets/fn"
2121
"github.com/lightninglabs/taproot-assets/internal/test"
22+
"github.com/lightninglabs/taproot-assets/lndservices"
2223
"github.com/lightninglabs/taproot-assets/proof"
2324
"github.com/lightninglabs/taproot-assets/rpcutils"
2425
"github.com/lightninglabs/taproot-assets/tappsbt"
@@ -59,7 +60,7 @@ func testMintFundSealAssets(t *harnessTest) {
5960
ctxt, cancel := context.WithTimeout(ctxb, defaultWaitTimeout)
6061
defer cancel()
6162

62-
aliceLndKeyRing := taprootassets.NewLndRpcKeyRing(
63+
aliceLndKeyRing := lndservices.NewLndRpcKeyRing(
6364
&aliceLndClient.LndServices,
6465
)
6566

@@ -219,7 +220,7 @@ func testMintFundSealAssets(t *harnessTest) {
219220
// Now we can construct any asset group witnesses needed. Before
220221
// performing any signing, we'll create a GenesisSigner backed by
221222
// Alice's LND node, which also derived all keypairs so far.
222-
aliceLndSigner := taprootassets.NewLndRpcVirtualTxSigner(
223+
aliceLndSigner := lndservices.NewLndRpcVirtualTxSigner(
223224
&aliceLndClient.LndServices,
224225
)
225226

@@ -593,7 +594,7 @@ func testMintExternalGroupKeyChantools(t *harnessTest) {
593594
// Derive a random key on an LND node, with a key family not matching the
594595
// Taproot Assets key family.
595596
func deriveRandomKey(t *testing.T, ctxt context.Context,
596-
keyRing *taprootassets.LndRpcKeyRing) keychain.KeyDescriptor {
597+
keyRing *lndservices.LndRpcKeyRing) keychain.KeyDescriptor {
597598

598599
var (
599600
randFam = test.RandInt31n(math.MaxInt32)

itest/utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/lightninglabs/taproot-assets/cmd/commands"
2222
"github.com/lightninglabs/taproot-assets/commitment"
2323
"github.com/lightninglabs/taproot-assets/fn"
24+
"github.com/lightninglabs/taproot-assets/lndservices"
2425
"github.com/lightninglabs/taproot-assets/proof"
2526
"github.com/lightninglabs/taproot-assets/rpcutils"
2627
"github.com/lightninglabs/taproot-assets/tapgarden"
@@ -623,7 +624,7 @@ func ManualMintSimpleAsset(t *harnessTest, lndNode *node.HarnessNode,
623624
require.NoError(t.t, err)
624625

625626
lndServices := &lndClient.LndServices
626-
walletAnchor := taprootassets.NewLndRpcWalletAnchor(lndServices)
627+
walletAnchor := lndservices.NewLndRpcWalletAnchor(lndServices)
627628

628629
// First, create and fund a genesis TX to anchor the asset.
629630
genesisDummyScript := append(

0 commit comments

Comments
 (0)