mirror of
https://github.com/aljazceru/lspd.git
synced 2026-01-06 07:34:23 +01:00
return 'pretend' amount from calc func
This commit is contained in:
@@ -23,7 +23,7 @@ func testZeroReserve(p *testParams) {
|
||||
|
||||
log.Printf("Adding bob's invoices")
|
||||
outerAmountMsat := uint64(2100000)
|
||||
innerAmountMsat := calculateInnerAmountMsat(p.lsp, outerAmountMsat)
|
||||
innerAmountMsat, lspAmountMsat := calculateInnerAmountMsat(p.lsp, outerAmountMsat)
|
||||
description := "Please pay me"
|
||||
innerInvoice, outerInvoice := GenerateInvoices(p.BreezClient(),
|
||||
generateInvoicesRequest{
|
||||
@@ -36,15 +36,13 @@ func testZeroReserve(p *testParams) {
|
||||
log.Print("Connecting bob to lspd")
|
||||
p.BreezClient().Node().ConnectPeer(p.lsp.LightningNode())
|
||||
|
||||
// NOTE: We pretend to be paying fees to the lsp, but actually we won't.
|
||||
log.Printf("Registering payment with lsp")
|
||||
pretendAmount := outerAmountMsat - 2000000
|
||||
RegisterPayment(p.lsp, &lspd.PaymentInformation{
|
||||
PaymentHash: innerInvoice.paymentHash,
|
||||
PaymentSecret: innerInvoice.paymentSecret,
|
||||
Destination: p.BreezClient().Node().NodeId(),
|
||||
IncomingAmountMsat: int64(outerAmountMsat),
|
||||
OutgoingAmountMsat: int64(pretendAmount),
|
||||
OutgoingAmountMsat: int64(lspAmountMsat),
|
||||
})
|
||||
|
||||
// TODO: Fix race waiting for htlc interceptor.
|
||||
|
||||
Reference in New Issue
Block a user