multi: rename key_send, key-send and key send to keysend

This commit is contained in:
Conner Fromknecht 2020-01-16 04:13:59 -08:00
parent 3aba0f1eaf
commit 51dbdd3b38
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
13 changed files with 638 additions and 637 deletions

View File

@ -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")

View File

@ -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"`

View File

@ -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 {

File diff suppressed because it is too large Load Diff

View File

@ -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 {

View File

@ -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]."

View File

@ -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()