Merge pull request #2717 from cfromknecht/send-payment-payreq

lnrpc+rpcserver: display payreq via listpayments
This commit is contained in:
Olaoluwa Osuntokun
2019-05-31 17:09:04 -07:00
committed by GitHub
6 changed files with 535 additions and 484 deletions

View File

@@ -1584,6 +1584,10 @@ type LightningPayment struct {
// hop. If nil, any channel may be used.
OutgoingChannelID *uint64
// PaymentRequest is an optional payment request that this payment is
// attempting to complete.
PaymentRequest []byte
// TODO(roasbeef): add e2e message?
}
@@ -1611,7 +1615,7 @@ func (r *ChannelRouter) SendPayment(payment *LightningPayment) ([32]byte, *route
PaymentHash: payment.PaymentHash,
Value: payment.Amount,
CreationDate: time.Now(),
PaymentRequest: nil,
PaymentRequest: payment.PaymentRequest,
}
err = r.cfg.Control.InitPayment(payment.PaymentHash, info)