add integration tests for LND lsp CLN client

This commit is contained in:
Jesse de Wit
2023-10-16 22:21:43 +02:00
parent 4640507c5f
commit c25a6e1a85
9 changed files with 79 additions and 10 deletions

View File

@@ -22,6 +22,7 @@ import (
ecies "github.com/ecies/go/v2"
"github.com/golang/protobuf/proto"
"github.com/jackc/pgx/v4/pgxpool"
"google.golang.org/grpc/metadata"
)
var (
@@ -121,6 +122,10 @@ func newLspd(h *lntest.TestHarness, mem *mempoolApi, name string, nodeConfig *co
if nodeConfig.MinConfs != nil {
conf.MinConfs = nodeConfig.MinConfs
}
if nodeConfig.LegacyOnionTokens != nil {
conf.LegacyOnionTokens = nodeConfig.LegacyOnionTokens
}
}
log.Printf("%s: node config: %+v", name, conf)
@@ -271,9 +276,10 @@ func RegisterPayment(l LspNode, paymentInfo *lspd.PaymentInformation, continueOn
encrypted, err := ecies.Encrypt(l.EciesPublicKey(), serialized)
lntest.CheckError(l.Harness().T, err)
ctx := metadata.AppendToOutgoingContext(l.Harness().Ctx, "authorization", "Bearer hello")
log.Printf("Registering payment")
_, err = l.Rpc().RegisterPayment(
l.Harness().Ctx,
ctx,
&lspd.RegisterPaymentRequest{
Blob: encrypted,
},