Skip to content

Commit fb060f7

Browse files
authored
Merge pull request #5991 from Roasbeef/remove-amp-hold-over
cmd/lncli: remove --amp-reuse flag from lncli payinvoice
2 parents b0fa19e + 94eae34 commit fb060f7

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

cmd/lncli/cmd_payments.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ var (
9494
Usage: "if set to true, then AMP will be used to complete the " +
9595
"payment",
9696
}
97-
98-
ampReuseFlag = cli.BoolFlag{
99-
Name: "amp-reuse",
100-
Usage: "if set to true, then a random payment address will " +
101-
"be generated to enable re-use of an AMP invoice",
102-
}
10397
)
10498

10599
// paymentFlags returns common flags for sendpayment and payinvoice.
@@ -145,7 +139,6 @@ func paymentFlags() []cli.Flag {
145139
},
146140
dataFlag, inflightUpdatesFlag, maxPartsFlag, jsonFlag,
147141
maxShardSizeSatFlag, maxShardSizeMsatFlag, ampFlag,
148-
ampReuseFlag,
149142
}
150143
}
151144

@@ -252,15 +245,6 @@ func parsePayAddr(ctx *cli.Context) ([]byte, error) {
252245
case ctx.IsSet("pay_addr"):
253246
payAddr, err = hex.DecodeString(ctx.String("pay_addr"))
254247

255-
case ctx.IsSet(ampReuseFlag.Name):
256-
var addrBytes [32]byte
257-
if _, err := rand.Read(addrBytes[:]); err != nil {
258-
return nil, fmt.Errorf("unable to generate pay "+
259-
"addr: %v", err)
260-
}
261-
262-
payAddr = addrBytes[:]
263-
264248
case ctx.Args().Present():
265249
payAddr, err = hex.DecodeString(ctx.Args().First())
266250
}

docs/release-notes/release-notes-0.14.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ messages directly. There is no routing/path finding involved.
370370
add MacChan field for passing back lnd's admin macaroon back to the program
371371
calling lnd, when needed.
372372

373+
* [The `--amp-reuse` CLI flag has been removed as the latest flavor of AMP now natively supports static invoices](https://github.com/lightningnetwork/lnd/pull/5991)
374+
373375
* Using `go get` to install go executables is now deprecated. Migrate to `go install` our lnrpc proto dockerfile [Migrate `go get` to `go install`](https://github.com/lightningnetwork/lnd/pull/5879)
374376

375377
* [The premature update map has been revamped using an LRU cache](https://github.com/lightningnetwork/lnd/pull/5902)

0 commit comments

Comments
 (0)