mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-03 08:20:30 +02:00
multi: rename key_send, key-send and key send to keysend
This commit is contained in:
parent
3aba0f1eaf
commit
51dbdd3b38
@ -2179,7 +2179,7 @@ var sendPaymentCommand = cli.Command{
|
||||
Usage: "the number of blocks the last hop has to reveal the preimage",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "key_send",
|
||||
Name: "keysend",
|
||||
Usage: "will generate a pre-image and encode it in the sphinx packet, a dest must be set [experimental]",
|
||||
},
|
||||
),
|
||||
@ -2287,7 +2287,7 @@ func sendPayment(ctx *cli.Context) error {
|
||||
|
||||
var rHash []byte
|
||||
|
||||
if ctx.Bool("key_send") {
|
||||
if ctx.Bool("keysend") {
|
||||
if ctx.IsSet("payment_hash") {
|
||||
return errors.New("cannot set payment hash when using " +
|
||||
"keysend")
|
||||
|
@ -326,7 +326,7 @@ type config struct {
|
||||
|
||||
EnableUpfrontShutdown bool `long:"enable-upfront-shutdown" description:"If true, option upfront shutdown script will be enabled. If peers that we open channels with support this feature, we will automatically set the script to which cooperative closes should be paid out to on channel open. This offers the partial protection of a channel peer disconnecting from us if cooperative close is attempted with a different script."`
|
||||
|
||||
AcceptKeySend bool `long:"accept-key-send" description:"If true, spontaneous payments through key send will be accepted. [experimental]"`
|
||||
AcceptKeySend bool `long:"accept-keysend" description:"If true, spontaneous payments through keysend will be accepted. [experimental]"`
|
||||
|
||||
Routing *routing.Conf `group:"routing" namespace:"routing"`
|
||||
|
||||
|
@ -146,7 +146,7 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
|
||||
State: state,
|
||||
Htlcs: rpcHtlcs,
|
||||
Features: CreateRPCFeatures(invoice.Terms.Features),
|
||||
IsKeySend: len(invoice.PaymentRequest) == 0,
|
||||
IsKeysend: len(invoice.PaymentRequest) == 0,
|
||||
}
|
||||
|
||||
if preimage != channeldb.UnknownPreimage {
|
||||
|
1205
lnrpc/rpc.pb.go
1205
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@ -2575,7 +2575,7 @@ message Invoice {
|
||||
Indicates if this invoice was a spontaneous payment that arrived via keysend
|
||||
[EXPERIMENTAL].
|
||||
*/
|
||||
bool is_key_send = 25 [json_name = "is_key_send"];
|
||||
bool is_keysend = 25 [json_name = "is_keysend"];
|
||||
}
|
||||
|
||||
enum InvoiceHTLCState {
|
||||
|
@ -2943,7 +2943,7 @@
|
||||
},
|
||||
"description": "/ List of features advertised on the invoice."
|
||||
},
|
||||
"is_key_send": {
|
||||
"is_keysend": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "*\nIndicates if this invoice was a spontaneous payment that arrived via keysend\n[EXPERIMENTAL]."
|
||||
|
@ -228,7 +228,7 @@ func (cfg NodeConfig) genArgs() []string {
|
||||
}
|
||||
|
||||
if cfg.AcceptKeySend {
|
||||
args = append(args, "--accept-key-send")
|
||||
args = append(args, "--accept-keysend")
|
||||
}
|
||||
|
||||
return args
|
||||
@ -317,9 +317,9 @@ func newNode(cfg NodeConfig) (*HarnessNode, error) {
|
||||
|
||||
cfg.P2PPort, cfg.RPCPort, cfg.RESTPort, cfg.ProfilePort = generateListeningPorts()
|
||||
|
||||
// Run all tests with accept key send. The key send code is very
|
||||
// isolated and it is highly unlikely that it would affect regular
|
||||
// itests when enabled.
|
||||
// Run all tests with accept keysend. The keysend code is very isolated
|
||||
// and it is highly unlikely that it would affect regular itests when
|
||||
// enabled.
|
||||
cfg.AcceptKeySend = true
|
||||
|
||||
numActiveNodesMtx.Lock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user