From f65c259f067fc023220c403c13fb036706106721 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 16 Nov 2021 13:51:05 +0100 Subject: [PATCH] cmd/lncli: fix nil map in payment req [skip ci] Fixes #5989. Fixes a panic in lncli if a payment request and the --data flag is used at the same time. --- cmd/lncli/cmd_payments.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/lncli/cmd_payments.go b/cmd/lncli/cmd_payments.go index 82808e3fc..a1033bcff 100644 --- a/cmd/lncli/cmd_payments.go +++ b/cmd/lncli/cmd_payments.go @@ -291,8 +291,9 @@ func sendPayment(ctx *cli.Context) error { // details of the payment are encoded within the request. if ctx.IsSet("pay_req") { req := &routerrpc.SendPaymentRequest{ - PaymentRequest: ctx.String("pay_req"), - Amt: ctx.Int64("amt"), + PaymentRequest: ctx.String("pay_req"), + Amt: ctx.Int64("amt"), + DestCustomRecords: make(map[uint64][]byte), } // We'll attempt to parse a payment address as well, given that