Skip to content

Commit

Permalink
itest: add RFQ system HTLC interception test
Browse files Browse the repository at this point in the history
This commit adds an itest which tests that the RFQ system can be used to
reach an agreement on a quote between two peers and then validate the
corresponding lightning payment HTLC.
  • Loading branch information
ffranr committed Feb 20, 2024
1 parent d3c7313 commit 3f54e18
Show file tree
Hide file tree
Showing 5 changed files with 368 additions and 0 deletions.
2 changes: 2 additions & 0 deletions itest/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/lightninglabs/taproot-assets/taprpc"
"github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
"github.com/lightninglabs/taproot-assets/taprpc/mintrpc"
"github.com/lightninglabs/taproot-assets/taprpc/rfqrpc"
unirpc "github.com/lightninglabs/taproot-assets/taprpc/universerpc"
)

Expand All @@ -12,5 +13,6 @@ type TapdClient interface {
taprpc.TaprootAssetsClient
unirpc.UniverseClient
mintrpc.MintClient
rfqrpc.RfqClient
assetwalletrpc.AssetWalletClient
}
4 changes: 4 additions & 0 deletions itest/loadtest/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/lightninglabs/taproot-assets/taprpc"
"github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
"github.com/lightninglabs/taproot-assets/taprpc/mintrpc"
"github.com/lightninglabs/taproot-assets/taprpc/rfqrpc"
"github.com/lightninglabs/taproot-assets/taprpc/tapdevrpc"
"github.com/lightninglabs/taproot-assets/taprpc/universerpc"
"github.com/lightningnetwork/lnd/macaroons"
Expand All @@ -38,6 +39,7 @@ type rpcClient struct {
assetwalletrpc.AssetWalletClient
tapdevrpc.TapDevClient
mintrpc.MintClient
rfqrpc.RfqClient
universerpc.UniverseClient
}

Expand Down Expand Up @@ -171,6 +173,7 @@ func getTapClient(t *testing.T, ctx context.Context,
assetWalletClient := assetwalletrpc.NewAssetWalletClient(conn)
devClient := tapdevrpc.NewTapDevClient(conn)
mintMintClient := mintrpc.NewMintClient(conn)
rfqClient := rfqrpc.NewRfqClient(conn)
universeClient := universerpc.NewUniverseClient(conn)

client := &rpcClient{
Expand All @@ -179,6 +182,7 @@ func getTapClient(t *testing.T, ctx context.Context,
AssetWalletClient: assetWalletClient,
TapDevClient: devClient,
MintClient: mintMintClient,
RfqClient: rfqClient,
UniverseClient: universeClient,
}

Expand Down
Loading

0 comments on commit 3f54e18

Please sign in to comment.