diff --git a/cmd/lncli/cmd_pay.go b/cmd/lncli/cmd_pay.go index 11abacbf..a90330b5 100644 --- a/cmd/lncli/cmd_pay.go +++ b/cmd/lncli/cmd_pay.go @@ -1,6 +1,7 @@ package main import ( + "bytes" "context" "crypto/rand" "encoding/hex" @@ -8,9 +9,13 @@ import ( "fmt" "io/ioutil" "os" + "runtime" "strconv" "strings" + "time" + "github.com/jedib0t/go-pretty/table" + "github.com/jedib0t/go-pretty/text" "github.com/lightninglabs/protobuf-hex-display/jsonpb" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnrpc/routerrpc" @@ -47,18 +52,25 @@ var ( "Custom record ids start from 65536.", } - showInflightFlag = cli.BoolFlag{ - Name: "show_inflight", + inflightUpdatesFlag = cli.BoolFlag{ + Name: "inflight_updates", Usage: "if set, intermediate payment state updates will be " + - "displayed", + "displayed. Only valid in combination with --json.", } - maxShardsFlag = cli.UintFlag{ - Name: "max_shards", + maxPartsFlag = cli.UintFlag{ + Name: "max_parts", Usage: "the maximum number of partial payments that may be " + "used", Value: 1, } + + jsonFlag = cli.BoolFlag{ + Name: "json", + Usage: "if set, payment updates are printed as json " + + "messages. Set by default on Windows because table " + + "formatting is unsupported.", + } ) // paymentFlags returns common flags for sendpayment and payinvoice. @@ -95,7 +107,7 @@ func paymentFlags() []cli.Flag { Name: "allow_self_payment", Usage: "allow sending a circular payment to self", }, - dataFlag, showInflightFlag, maxShardsFlag, + dataFlag, inflightUpdatesFlag, maxPartsFlag, jsonFlag, } } @@ -325,7 +337,7 @@ func sendPaymentRequest(ctx *cli.Context, req.AllowSelfPayment = ctx.Bool("allow_self_payment") - req.MaxShards = uint32(ctx.Uint(maxShardsFlag.Name)) + req.MaxParts = uint32(ctx.Uint(maxPartsFlag.Name)) // Parse custom data records. data := ctx.String(dataFlag.Name) @@ -397,32 +409,30 @@ func sendPaymentRequest(ctx *cli.Context, req.FeeLimitSat = feeLimit - req.NoInflightUpdates = !ctx.Bool(showInflightFlag.Name) + // Always print in-flight updates for the table output. + printJSON := ctx.Bool(jsonFlag.Name) + req.NoInflightUpdates = !ctx.Bool(inflightUpdatesFlag.Name) && printJSON stream, err := routerClient.SendPaymentV2(context.Background(), req) if err != nil { return err } - for { - status, err := stream.Recv() - if err != nil { - return err - } - - printRespJSON(status) - - if status.Status != lnrpc.Payment_IN_FLIGHT { - // If we get a payment error back, we pass an error up - // to main which eventually calls fatal() and returns - // with a non-zero exit code. - if status.Status != lnrpc.Payment_SUCCEEDED { - return errors.New(status.Status.String()) - } - - return nil - } + finalState, err := printLivePayment( + stream, client, printJSON, + ) + if err != nil { + return err } + + // If we get a payment error back, we pass an error up + // to main which eventually calls fatal() and returns + // with a non-zero exit code. + if finalState.Status != lnrpc.Payment_SUCCEEDED { + return errors.New(finalState.Status.String()) + } + + return nil } var trackPaymentCommand = cli.Command{ @@ -443,7 +453,7 @@ func trackPayment(ctx *cli.Context) error { conn := getClientConn(ctx, false) defer conn.Close() - client := routerrpc.NewRouterClient(conn) + routerClient := routerrpc.NewRouterClient(conn) if !args.Present() { return fmt.Errorf("hash argument missing") @@ -458,25 +468,206 @@ func trackPayment(ctx *cli.Context) error { PaymentHash: hash, } - stream, err := client.TrackPaymentV2(context.Background(), req) + stream, err := routerClient.TrackPaymentV2(context.Background(), req) if err != nil { return err } + client := lnrpc.NewLightningClient(conn) + _, err = printLivePayment(stream, client, ctx.Bool(jsonFlag.Name)) + return err +} + +// printLivePayment receives payment updates from the given stream and either +// outputs them as json or as a more user-friendly formatted table. The table +// option uses terminal control codes to rewrite the output. This call +// terminates when the payment reaches a final state. +func printLivePayment(stream routerrpc.Router_TrackPaymentV2Client, + client lnrpc.LightningClient, json bool) (*lnrpc.Payment, error) { + + // Terminal escape codes aren't supported on Windows, fall back to json. + if !json && runtime.GOOS == "windows" { + json = true + } + + aliases := newAliasCache(client) + + first := true + var lastLineCount int for { - status, err := stream.Recv() + payment, err := stream.Recv() if err != nil { - return err + return nil, err } - printRespJSON(status) + if json { + // Delimit json messages by newlines (inspired by + // grpc over rest chunking). + if first { + first = false + } else { + fmt.Println() + } - if status.Status != lnrpc.Payment_IN_FLIGHT { - return nil + // Write raw json to stdout. + printRespJSON(payment) + } else { + table := formatPayment(payment, aliases) + + // Clear all previously written lines and print the + // updated table. + clearLines(lastLineCount) + fmt.Print(table) + + // Store the number of lines written for the next update + // pass. + lastLineCount = 0 + for _, b := range table { + if b == '\n' { + lastLineCount++ + } + } + } + + // Terminate loop if payments state is final. + if payment.Status != lnrpc.Payment_IN_FLIGHT { + return payment, nil } } } +// aliasCache allows cached retrieval of node aliases. +type aliasCache struct { + cache map[string]string + client lnrpc.LightningClient +} + +func newAliasCache(client lnrpc.LightningClient) *aliasCache { + return &aliasCache{ + client: client, + cache: make(map[string]string), + } +} + +// get returns a node alias either from cache or freshly requested from lnd. +func (a *aliasCache) get(pubkey string) string { + alias, ok := a.cache[pubkey] + if ok { + return alias + } + + // Request node info. + resp, err := a.client.GetNodeInfo( + context.Background(), + &lnrpc.NodeInfoRequest{ + PubKey: pubkey, + }, + ) + if err != nil { + // If no info is available, use the + // pubkey as identifier. + alias = pubkey[:6] + } else { + alias = resp.Node.Alias + } + a.cache[pubkey] = alias + + return alias +} + +// formatMsat formats msat amounts as fractional sats. +func formatMsat(amt int64) string { + return strconv.FormatFloat(float64(amt)/1000.0, 'f', -1, 64) +} + +// formatPayment formats the payment state as an ascii table. +func formatPayment(payment *lnrpc.Payment, aliases *aliasCache) string { + t := table.NewWriter() + + // Build table header. + t.AppendHeader(table.Row{ + "HTLC_STATE", "ATTEMPT_TIME", "RESOLVE_TIME", "RECEIVER_AMT", + "FEE", "TIMELOCK", "CHAN_OUT", "ROUTE", + }) + t.SetColumnConfigs([]table.ColumnConfig{ + {Name: "ATTEMPT_TIME", Align: text.AlignRight}, + {Name: "RESOLVE_TIME", Align: text.AlignRight}, + {Name: "CHAN_OUT", Align: text.AlignLeft, + AlignHeader: text.AlignLeft}, + }) + + // Add all htlcs as rows. + createTime := time.Unix(0, payment.CreationTimeNs) + var totalPaid, totalFees int64 + for _, htlc := range payment.Htlcs { + formatTime := func(timeNs int64) string { + if timeNs == 0 { + return "-" + } + resolveTime := time.Unix(0, timeNs) + resolveTimeMs := resolveTime.Sub(createTime). + Milliseconds() + return fmt.Sprintf( + "%.3f", float64(resolveTimeMs)/1000.0, + ) + } + + attemptTime := formatTime(htlc.AttemptTimeNs) + resolveTime := formatTime(htlc.ResolveTimeNs) + + route := htlc.Route + lastHop := route.Hops[len(route.Hops)-1] + + hops := []string{} + for _, h := range route.Hops { + alias := aliases.get(h.PubKey) + hops = append(hops, alias) + } + + state := htlc.Status.String() + if htlc.Failure != nil { + state = fmt.Sprintf( + "%v @ %v", + htlc.Failure.Code, + htlc.Failure.FailureSourceIndex, + ) + } + + t.AppendRow([]interface{}{ + state, attemptTime, resolveTime, + formatMsat(lastHop.AmtToForwardMsat), + formatMsat(route.TotalFeesMsat), + route.TotalTimeLock, route.Hops[0].ChanId, + strings.Join(hops, "->")}, + ) + + if htlc.Status == lnrpc.HTLCAttempt_SUCCEEDED { + totalPaid += lastHop.AmtToForwardMsat + totalFees += route.TotalFeesMsat + } + } + + // Render table. + b := &bytes.Buffer{} + t.SetOutputMirror(b) + t.Render() + + // Add additional payment-level data. + fmt.Fprintf(b, "Amount + fee: %v + %v sat\n", + formatMsat(totalPaid), formatMsat(totalFees)) + fmt.Fprintf(b, "Payment hash: %v\n", payment.PaymentHash) + fmt.Fprintf(b, "Payment status: %v", payment.Status) + switch payment.Status { + case lnrpc.Payment_SUCCEEDED: + fmt.Fprintf(b, ", preimage: %v", payment.PaymentPreimage) + case lnrpc.Payment_FAILED: + fmt.Fprintf(b, ", reason: %v", payment.FailureReason) + } + fmt.Fprintf(b, "\n") + + return b.String() +} + var payInvoiceCommand = cli.Command{ Name: "payinvoice", Category: "Payments", @@ -672,3 +863,15 @@ func sendToRouteRequest(ctx *cli.Context, req *lnrpc.SendToRouteRequest) error { return nil } + +// ESC is the ASCII code for escape character +const ESC = 27 + +// clearCode defines a terminal escape code to clear the currently line and move +// the cursor up. +var clearCode = fmt.Sprintf("%c[%dA%c[2K", ESC, 1, ESC) + +// clearLines erases the last count lines in the terminal window. +func clearLines(count int) { + _, _ = fmt.Print(strings.Repeat(clearCode, count)) +} diff --git a/go.mod b/go.mod index a4943762..e5f42da9 100644 --- a/go.mod +++ b/go.mod @@ -17,12 +17,14 @@ require ( github.com/btcsuite/fastsha256 v0.0.0-20160815193821-637e65642941 github.com/davecgh/go-spew v1.1.1 github.com/go-errors/errors v1.0.1 + github.com/go-openapi/strfmt v0.19.5 // indirect github.com/golang/protobuf v1.3.1 github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway v1.8.6 github.com/jackpal/gateway v1.0.5 github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad + github.com/jedib0t/go-pretty v4.3.0+incompatible github.com/jessevdk/go-flags v1.4.0 github.com/jrick/logrotate v1.0.0 github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c // indirect @@ -40,6 +42,7 @@ require ( github.com/lightningnetwork/lnd/queue v1.0.3 github.com/lightningnetwork/lnd/ticker v1.0.0 github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 + github.com/mattn/go-runewidth v0.0.9 // indirect github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8 github.com/prometheus/client_golang v0.9.3 github.com/rogpeppe/fastuuid v1.2.0 // indirect @@ -47,6 +50,7 @@ require ( github.com/urfave/cli v1.18.0 golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d golang.org/x/net v0.0.0-20190206173232-65e2d4e15006 + golang.org/x/sys v0.0.0-20200116001909-b77594299b42 // indirect golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 google.golang.org/grpc v1.19.0 diff --git a/go.sum b/go.sum index c58f8025..85a5e155 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -66,6 +68,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -79,6 +82,11 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= @@ -90,6 +98,10 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42 h1:q3pnF5JFBNRz8sRD+IRj7Y6DMyYGTNqnZ9axTbSfoNI= github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -102,6 +114,8 @@ github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad h1:heFfj7z0pGsNCekUlsFhO2jstxO4b5iQ665LjwM5mDc= github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jedib0t/go-pretty v4.3.0+incompatible h1:CGs8AVhEKg/n9YbUenWmNStRW2PHJzaeDodcfvRAbIo= +github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -145,10 +159,14 @@ github.com/lightningnetwork/lightning-onion v1.0.1/go.mod h1:rigfi6Af/KqsF7Za0hO github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY= github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8 h1:PRMAcldsl4mXKJeRNB/KVNz6TlbS6hk2Rs42PqgU3Ws= github.com/miekg/dns v0.0.0-20171125082028-79bfde677fa8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -178,15 +196,23 @@ github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 h1:tcJ6OjwOMvExLlzrAVZute09ocAGa7KqOON60++Gz4E= github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY= github.com/urfave/cli v1.18.0 h1:m9MfmZWX7bwr9kUcs/Asr95j0IVXzGNNc+/5ku2m26Q= github.com/urfave/cli v1.18.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -214,6 +240,8 @@ golang.org/x/sys v0.0.0-20190209173611-3b5209105503 h1:5SvYFrOM3W8Mexn9/oA44Ji7v golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd h1:DBH9mDw0zluJT/R+nGuV3jWFWLFaHyYZWD4tOT+cjn0= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/lnrpc/routerrpc/router.pb.go b/lnrpc/routerrpc/router.pb.go index 2b2ed2d8..ae57eacd 100644 --- a/lnrpc/routerrpc/router.pb.go +++ b/lnrpc/routerrpc/router.pb.go @@ -281,7 +281,7 @@ type SendPaymentRequest struct { //* //The maximum number of partial payments that may be use to complete the full //amount. - MaxShards uint32 `protobuf:"varint,17,opt,name=max_shards,json=maxShards,proto3" json:"max_shards,omitempty"` + MaxParts uint32 `protobuf:"varint,17,opt,name=max_parts,json=maxParts,proto3" json:"max_parts,omitempty"` //* //If set, only the final payment update is streamed back. Intermediate updates //that show which htlcs are still in flight are suppressed. @@ -428,9 +428,9 @@ func (m *SendPaymentRequest) GetDestFeatures() []lnrpc.FeatureBit { return nil } -func (m *SendPaymentRequest) GetMaxShards() uint32 { +func (m *SendPaymentRequest) GetMaxParts() uint32 { if m != nil { - return m.MaxShards + return m.MaxParts } return 0 } @@ -1746,148 +1746,148 @@ func init() { func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) } var fileDescriptor_7a0613f69d37b0a5 = []byte{ - // 2247 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0x4d, 0x77, 0xdb, 0xc6, - 0xd5, 0x0e, 0x48, 0x50, 0x22, 0x2f, 0x3f, 0x04, 0x8d, 0x1c, 0x99, 0x2f, 0x65, 0x27, 0x0c, 0xde, - 0xc4, 0xe6, 0x71, 0x1d, 0xc9, 0x51, 0x7b, 0xda, 0x9c, 0xb6, 0x49, 0x4b, 0x91, 0x90, 0x05, 0x9b, - 0x02, 0x98, 0x21, 0x25, 0xdb, 0xf5, 0x62, 0x0e, 0x44, 0x0e, 0x45, 0x54, 0xf8, 0x60, 0x81, 0xa1, - 0x1d, 0x2d, 0xbb, 0xeb, 0xe9, 0xb6, 0x3f, 0xa2, 0xbb, 0xfe, 0x82, 0xee, 0xfb, 0x33, 0xba, 0xed, - 0x2f, 0xe8, 0xba, 0x67, 0x06, 0x03, 0x12, 0x94, 0x28, 0xbb,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x15, 0x2d, 0xa7, 0xff, 0x59, 0x81, 0x72, 0xc6, 0x88, 0xf6, 0xa0, 0x14, 0x84, - 0x63, 0x4a, 0x26, 0x51, 0xe8, 0xa7, 0x8b, 0xc0, 0x81, 0xe3, 0x28, 0xf4, 0xb9, 0x26, 0x84, 0x91, - 0x85, 0x52, 0xc0, 0x1b, 0xfc, 0x73, 0x18, 0xa2, 0xaf, 0x61, 0x73, 0x9a, 0x38, 0x10, 0x5b, 0x61, - 0xf9, 0x70, 0xe7, 0xc6, 0xdc, 0x5d, 0x87, 0x39, 0x38, 0xe5, 0xbc, 0x50, 0x8b, 0x79, 0x4d, 0x7d, - 0xa1, 0x16, 0x55, 0xad, 0xf0, 0x42, 0x2d, 0x16, 0xb4, 0x8d, 0x17, 0x6a, 0x71, 0x43, 0xdb, 0xd4, - 0xff, 0xa5, 0x40, 0x31, 0x65, 0xf3, 0x48, 0xf8, 0x92, 0x12, 0xae, 0x0b, 0x29, 0xa6, 0x22, 0x07, - 0x86, 0xae, 0x4f, 0x51, 0x13, 0x2a, 0xc2, 0xb8, 0x2a, 0x51, 0xe0, 0x58, 0x5b, 0xc8, 0x54, 0xec, - 0xd1, 0x29, 0x43, 0xe8, 0x51, 0x95, 0x7b, 0x74, 0x42, 0x49, 0x8f, 0x99, 0x78, 0x3e, 0x1a, 0xd1, - 0x38, 0x4e, 0x66, 0x29, 0x24, 0x14, 0x89, 0x89, 0x89, 0x1e, 0xc1, 0x56, 0x4a, 0x49, 0xe7, 0xda, - 0x48, 0xf4, 0x2a, 0x61, 0x39, 0x5d, 0x0b, 0xb4, 0x2c, 0xcf, 0x5f, 0x9e, 0x0a, 0xb5, 0x25, 0x91, - 0x4f, 0x9a, 0x24, 0xaf, 0xff, 0x1e, 0xee, 0x8b, 0x52, 0xf6, 0xa3, 0xf0, 0xc2, 0xb9, 0x70, 0x3d, - 0x97, 0x5d, 0xa7, 0x22, 0xe7, 0x89, 0x47, 0xa1, 0x4f, 0xf8, 0xda, 0xa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 0xb6, 0xf1, 0xab, 0x36, 0xee, 0x6a, - 0xf9, 0xa3, 0x4d, 0x28, 0x88, 0x79, 0xf5, 0xbf, 0x2b, 0x50, 0x14, 0x15, 0x0c, 0x26, 0x21, 0xfa, - 0x09, 0x2c, 0xc4, 0x25, 0x36, 0x37, 0x7e, 0xe0, 0x0a, 0xd5, 0x55, 0xf1, 0x42, 0x30, 0x43, 0x89, - 0x73, 0xf2, 0x42, 0x1a, 0x0b, 0x72, 0x2e, 0x21, 0xa7, 0x86, 0x05, 0xf9, 0x49, 0xc6, 0xf3, 0xca, - 0x96, 0xa3, 0xe2, 0xad, 0xd4, 0x90, 0xee, 0xb0, 0x4f, 0x32, 0x8e, 0x57, 0x76, 0x62, 0x15, 0x6f, - 0xa5, 0x06, 0xc9, 0xd5, 0x7f, 0x01, 0x95, 0x6c, 0xcd, 0xd1, 0x63, 0x50, 0xdd, 0x60, 0x12, 0xca, - 0x46, 0xdc, 0xb9, 0x21, 0x2e, 0x9e, 0x24, 0x16, 0x04, 0x1d, 0x81, 0x76, 0xb3, 0xce, 0x7a, 0x15, - 0xca, 0x99, 0xa2, 0xe9, 0xff, 0x54, 0xa0, 0xba, 0x52, 0x84, 0xff, 0xda, 0x3b, 0xfa, 0x0e, 0x2a, - 0xef, 0xdd, 0x88, 0x92, 0xec, 0xf1, 0x5f, 0x3b, 0x6c, 0xac, 0x1e, 0xff, 0xe9, 0xff, 0x9d, 0x70, - 0x4c, 0x71, 0x99, 0xf3, 0x25, 0x80, 0x7e, 0x03, 0x35, 0x39, 0x92, 0x8c, 0x29, 0x73, 0x5c, 0x4f, - 0x2c, 0x55, 0x6d, 0x45, 0x1e, 0x92, 0xdb, 0x15, 0x76, 0x5c, 0x9d, 0x64, 0x3f, 0xd1, 0x57, 0x4b, - 0x07, 0x31, 0x8b, 0xdc, 0xe0, 0x52, 0xac, 0x5f, 0x69, 0x41, 0x1b, 0x08, 0x90, 0x1f, 0xe4, 0x55, - 0x79, 0x79, 0x1c, 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d, 0x5a, 0x5a, 0x99, 0xe5, 0x43, 0xcf, 0xa6, 0xb7, 0xa0, 0xdd, 0xbc, 0x1e, 0x23, - 0xfd, 0xe6, 0xd8, 0xdb, 0xf7, 0xf4, 0xc6, 0xff, 0x7f, 0x90, 0x23, 0x9d, 0x9b, 0x00, 0xcb, 0x4b, - 0x26, 0x7a, 0x90, 0x19, 0x72, 0xeb, 0x92, 0xdc, 0x78, 0x78, 0x87, 0x55, 0xba, 0x1a, 0xc2, 0xce, - 0x9a, 0x5b, 0xe7, 0xca, 0x6a, 0xdc, 0x7d, 0x2b, 0x6d, 0xdc, 0x5b, 0x77, 0x39, 0x7b, 0xa6, 0xa0, - 0xd3, 0x44, 0x17, 0xe9, 0x1f, 0x55, 0x3e, 0x22, 0xf4, 0xfa, 0xfa, 0x43, 0x64, 0x1e, 0xeb, 0xf9, - 0x3f, 0xe5, 0x94, 0x67, 0x0a, 0xb2, 0xa1, 0x92, 0x15, 0xf7, 0x47, 0x55, 0xff, 0x31, 0x87, 0x47, - 0xdf, 0xfc, 0xee, 0xe0, 0xd2, 0x65, 0xd3, 0xf9, 0xc5, 0xfe, 0x28, 0xf4, 0x0f, 0xc4, 0x5f, 0x32, - 0x02, 0x37, 0xb8, 0x0c, 0x28, 0x7b, 0x1f, 0x46, 0x57, 0x07, 0x5e, 0x30, 0x3e, 0x10, 0x7d, 0x73, - 0xb0, 0xf0, 0x73, 0xb1, 0x21, 0xfe, 0x38, 0xf9, 0xd3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8d, - 0x86, 0x7a, 0x49, 0xcc, 0x14, 0x00, 0x00, + // 2248 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0xcd, 0x76, 0xdb, 0xb8, + 0xf5, 0x1f, 0x4a, 0x94, 0x2d, 0x5d, 0x7d, 0x98, 0x86, 0x33, 0x8e, 0xfe, 0x72, 0x32,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x15, 0xf3, 0x4f, 0x74, 0x0f, 0x0a, 0xef, 0x1c, 0x6f, 0x4e, 0x45, 0x11, 0x54, 0x70, + 0x32, 0xf8, 0x65, 0xee, 0x5b, 0x45, 0x9f, 0xc2, 0xce, 0x30, 0x72, 0x46, 0x57, 0x37, 0xea, 0xe8, + 0x66, 0x19, 0x28, 0xb7, 0xcb, 0xe0, 0x0e, 0x7f, 0x73, 0x77, 0xf8, 0xab, 0x7f, 0x0f, 0x5b, 0x22, + 0xc3, 0xc7, 0x94, 0x7e, 0xa8, 0x5a, 0xef, 0x03, 0xaf, 0x45, 0xc1, 0xed, 0xa4, 0x62, 0x37, 0x1c, + 0x9f, 0xd3, 0x5a, 0x1f, 0x83, 0xb6, 0x9c, 0x1f, 0xcf, 0xc2, 0x20, 0xa6, 0xbc, 0x14, 0x39, 0x01, + 0x38, 0x87, 0x39, 0xe5, 0x05, 0xd9, 0x15, 0x31, 0xab, 0x26, 0xf1, 0x63, 0x4a, 0x05, 0xdd, 0x1f, + 0x25, 0x15, 0x46, 0xbc, 0x70, 0x74, 0xc5, 0x6b, 0xd6, 0xb9, 0x96, 0xe6, 0xab, 0x1c, 0xee, 0x85, + 0xa3, 0xab, 0x2e, 0x07, 0xf5, 0xb7, 0xc9, 0xb1, 0x32, 0x0c, 0xc5, 0x5a, 0xff, 0xc3, 0x76, 0xe8, + 0x50, 0x10, 0x5c, 0x14, 0x66, 0xcb, 0x87, 0x95, 0x2c, 0xa9, 0x71, 0x22, 0xd2, 0xdf, 0xc2, 0xce, + 0x8a, 0x71, 0x19, 0x45, 0x03, 0x8a, 0xb3, 0x88, 0xba, 0xbe, 0x73, 0x49, 0xa5, 0xe5, 0xc5, 0x18, + 0xb5, 0x60, 0x73, 0xe2, 0xb8, 0xde, 0x3c, 0x4a, 0x0d, 0xd7, 0x52, 0x92, 0x25, 0x28, 0x4e, 0xc5, + 0xfa, 0x03, 0x68, 0x60, 0x1a, 0x53, 0x76, 0xea, 0xc6, 0xb1, 0x1b, 0x06, 0x9d, 0x30, 0x60, 0x51, + 0xe8, 0xc9, 0x08, 0xf4, 0x87, 0xb0, 0xb7, 0x56, 0x9a, 0xb8, 0xc0, 0x27, 0xff, 0x30, 0xa7, 0xd1, + 0xf5, 0xfa, 0xc9, 0x3f, 0xc0, 0xde, 0x5a, 0xa9, 0xf4, 0xff, 0x29, 0x14, 0x66, 0x8e, 0x1b, 0xf1, + 0xdc, 0xf3, 0xa2, 0xdc, 0xcd, 0x14, 0x65, 0xdf, 0x71, 0xa3, 0x13, 0x37, 0x66, 0x61, 0x74, 0x8d, + 0x13, 0xa5, 0x17, 0x6a, 0x51, 0xd1, 0x72, 0xfa, 0x9f, 0x15, 0x28, 0x67, 0x84, 0xbc, 0x34, 0x82, + 0x70, 0x4c, 0xc9, 0x24, 0x0a, 0xfd, 0x74, 0x13, 0x38, 0x70, 0x1c, 0x85, 0x3e, 0xe7, 0x84, 0x10, + 0xb2, 0x50, 0x12, 0x78, 0x83, 0x0f, 0x87, 0x21, 0xfa, 0x1a, 0x36, 0xa7, 0x89, 0x01, 0x71, 0x10, + 0x96, 0x0f, 0x77, 0x6e, 0xac, 0xdd, 0x75, 0x98, 0x83, 0x53, 0x9d, 0x17, 0x6a, 0x31, 0xaf, 0xa9, + 0x2f, 0xd4, 0xa2, 0xaa, 0x15, 0x5e, 0xa8, 0xc5, 0x82, 0xb6, 0xf1, 0x42, 0x2d, 0x6e, 0x68, 0x9b, + 0xfa, 0xbf, 0x14, 0x28, 0xa6, 0xda, 0xdc, 0x13, 0xbe, 0xa5, 0x84, 0xf3, 0x42, 0x92, 0xa9, 0xc8, + 0x81, 0xa1, 0xeb, 0x53, 0xd4, 0x84, 0x8a, 0x10, 0xae, 0x52, 0x14, 0x38, 0xd6, 0x16, 0x34, 0x15, + 0x27, 0x74, 0xaa, 0x21, 0xf8, 0xa8, 0xca, 0x13, 0x3a, 0x51, 0x49, 0x9b, 0x4c, 0x3c, 0x1f, 0x8d, + 0x68, 0x1c, 0x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d3, 0x2a, 0xfd, 0xb7, 0x0a, 0xa5, 0x05, 0xca, 0x8f, + 0x67, 0x37, 0x18, 0x85, 0x7e, 0xea, 0x74, 0x40, 0x3d, 0xee, 0x77, 0xd2, 0x14, 0xb6, 0x53, 0x51, + 0x27, 0x91, 0x98, 0x63, 0xae, 0xbf, 0x12, 0xa4, 0xd4, 0xcf, 0x25, 0xfa, 0xd9, 0x18, 0x13, 0xfd, + 0x16, 0x68, 0x0b, 0xfb, 0x53, 0xe6, 0x8d, 0x16, 0x9b, 0x82, 0x6b, 0x29, 0xce, 0x9d, 0x49, 0x34, + 0x17, 0x96, 0x53, 0x4d, 0x35, 0xd1, 0x4c, 0x71, 0xa9, 0xf9, 0x05, 0x54, 0x78, 0x3d, 0xc4, 0xcc, + 0xf1, 0x67, 0x24, 0x88, 0x45, 0x5d, 0xa8, 0xb8, 0xbc, 0xc0, 0xac, 0x18, 0x7d, 0x07, 0x40, 0x79, + 0x7c, 0x84, 0x5d, 0xcf, 0xa8, 0x28, 0x89, 0xda, 0xe1, 0x67, 0x19, 0x62, 0x2c, 0x36, 0x60, 0x5f, + 0xfc, 0x1d, 0x5e, 0xcf, 0x28, 0x2e, 0xd1, 0xf4, 0x13, 0x7d, 0x0f, 0xd5, 0x49, 0x18, 0xbd, 0x77, + 0xa2, 0x31, 0x11, 0xa0, 0x3c, 0x36, 0xee, 0x67, 0x2c, 0x1c, 0x27, 0x72, 0x31, 0xfd, 0xe4, 0x13, + 0x5c, 0x99, 0x64, 0xc6, 0xe8, 0x25, 0xa0, 0x74, 0xbe, 0xa8, 0xf2, 0xc4, 0x48, 0x51, 0x18, 0xd9, + 0xbb, 0x6d, 0x84, 0x1f, 0xd2, 0xa9, 0x21, 0x6d, 0x72, 0x03, 0x43, 0xbf, 0x82, 0x4a, 0x4c, 0x19, + 0xf3, 0xa8, 0x34, 0x53, 0x12, 0x66, 0x76, 0x57, 0xee, 0x34, 0x5c, 0x9c, 0x5a, 0x28, 0xc7, 0xcb, +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x60, 0x7c, 0x20, 0xea, + 0xe6, 0x60, 0x61, 0xe7, 0x62, 0x43, 0xfc, 0x34, 0xf9, 0xd3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x16, 0x00, 0xbc, 0x19, 0xca, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/lnrpc/routerrpc/router.proto b/lnrpc/routerrpc/router.proto index 9065715a..673ffb98 100644 --- a/lnrpc/routerrpc/router.proto +++ b/lnrpc/routerrpc/router.proto @@ -119,7 +119,7 @@ message SendPaymentRequest { The maximum number of partial payments that may be use to complete the full amount. */ - uint32 max_shards = 17; + uint32 max_parts = 17; /** If set, only the final payment update is streamed back. Intermediate updates diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go index 2803f447..354e5e29 100644 --- a/lnrpc/routerrpc/router_backend.go +++ b/lnrpc/routerrpc/router_backend.go @@ -549,11 +549,11 @@ func (r *RouterBackend) extractIntentFromSendRequest( // Take max htlcs from the request. Map zero to one for backwards // compatibility. - maxShards := rpcPayReq.MaxShards - if maxShards == 0 { - maxShards = 1 + maxParts := rpcPayReq.MaxParts + if maxParts == 0 { + maxParts = 1 } - payIntent.MaxShards = maxShards + payIntent.MaxParts = maxParts // Take fee limit from request. payIntent.FeeLimit, err = lnrpc.UnmarshallAmt( diff --git a/lnrpc/routerrpc/router_server_deprecated.go b/lnrpc/routerrpc/router_server_deprecated.go index 199ec841..66f3d368 100644 --- a/lnrpc/routerrpc/router_server_deprecated.go +++ b/lnrpc/routerrpc/router_server_deprecated.go @@ -84,7 +84,7 @@ func (s *Server) TrackPayment(request *TrackPaymentRequest, func (s *Server) SendPayment(request *SendPaymentRequest, stream Router_SendPaymentServer) error { - if request.MaxShards > 1 { + if request.MaxParts > 1 { return errors.New("for multi-part payments, use SendPaymentV2") } diff --git a/lntest/itest/lnd_send_multi_path_payment.go b/lntest/itest/lnd_send_multi_path_payment.go index 318f2556..22732000 100644 --- a/lntest/itest/lnd_send_multi_path_payment.go +++ b/lntest/itest/lnd_send_multi_path_payment.go @@ -74,7 +74,7 @@ func testSendMultiPathPayment(net *lntest.NetworkHarness, t *harnessTest) { t, net.Alice, &routerrpc.SendPaymentRequest{ PaymentRequest: payReq, - MaxShards: 10, + MaxParts: 10, TimeoutSeconds: 60, FeeLimitMsat: noFeeLimitMsat, }, diff --git a/routing/integrated_routing_context_test.go b/routing/integrated_routing_context_test.go index cc71560d..b223668e 100644 --- a/routing/integrated_routing_context_test.go +++ b/routing/integrated_routing_context_test.go @@ -88,7 +88,7 @@ func (h htlcAttempt) String() string { // testPayment launches a test payment and asserts that it is completed after // the expected number of attempts. -func (c *integratedRoutingContext) testPayment(maxShards uint32) ([]htlcAttempt, +func (c *integratedRoutingContext) testPayment(maxParts uint32) ([]htlcAttempt, error) { var ( @@ -137,7 +137,7 @@ func (c *integratedRoutingContext) testPayment(maxShards uint32) ([]htlcAttempt, DestFeatures: lnwire.NewFeatureVector(mppFeatures, nil), Amount: c.amt, CltvLimit: math.MaxUint32, - MaxShards: maxShards, + MaxParts: maxParts, } session, err := newPaymentSession( diff --git a/routing/integrated_routing_test.go b/routing/integrated_routing_test.go index 1d897d8a..4f044d8e 100644 --- a/routing/integrated_routing_test.go +++ b/routing/integrated_routing_test.go @@ -85,7 +85,7 @@ type mppSendTestCase struct { graph func(g *mockGraph) expectedFailure bool - maxShards uint32 + maxParts uint32 } const ( @@ -152,7 +152,7 @@ var mppTestCases = []mppSendTestCase{ chans: []uint64{chanSourceIm2, chanIm2Target}, }, }, - maxShards: 1000, + maxParts: 1000, }, // Test that a cap on the max htlcs makes it impossible to pay. @@ -165,7 +165,7 @@ var mppTestCases = []mppSendTestCase{ expectedAttempts: 2, expectedSuccesses: []expectedHtlcSuccess{}, expectedFailure: true, - maxShards: 1, + maxParts: 1, }, // Test that an attempt is made to split the payment in multiple parts @@ -190,7 +190,7 @@ var mppTestCases = []mppSendTestCase{ }, }, expectedFailure: true, - maxShards: 1000, + maxParts: 1000, }, // Test that no attempts are made if the total local balance is @@ -203,7 +203,7 @@ var mppTestCases = []mppSendTestCase{ amt: 300000, expectedAttempts: 0, expectedFailure: true, - maxShards: 10, + maxParts: 10, }, } @@ -226,7 +226,7 @@ func testMppSend(t *testing.T, testCase *mppSendTestCase) { ctx.amt = lnwire.NewMSatFromSatoshis(testCase.amt) - attempts, err := ctx.testPayment(testCase.maxShards) + attempts, err := ctx.testPayment(testCase.maxParts) switch { case err == nil && testCase.expectedFailure: t.Fatal("expected payment to fail") diff --git a/routing/payment_session.go b/routing/payment_session.go index 5cd8d9f7..ed22b8c6 100644 --- a/routing/payment_session.go +++ b/routing/payment_session.go @@ -263,11 +263,11 @@ func (p *paymentSession) RequestRoute(maxAmt, feeLimit lnwire.MilliSatoshi, } // No splitting if this is the last shard. - isLastShard := activeShards+1 >= p.payment.MaxShards + isLastShard := activeShards+1 >= p.payment.MaxParts if isLastShard { p.log.Debugf("not splitting because shard "+ "limit %v has been reached", - p.payment.MaxShards) + p.payment.MaxParts) return nil, errNoPathFound } diff --git a/routing/router.go b/routing/router.go index 2d286ce5..c3773fe6 100644 --- a/routing/router.go +++ b/routing/router.go @@ -1625,9 +1625,9 @@ type LightningPayment struct { // fail. DestCustomRecords record.CustomSet - // MaxShards is the maximum number of partial payments that may be used + // MaxParts is the maximum number of partial payments that may be used // to complete the full amount. - MaxShards uint32 + MaxParts uint32 } // SendPayment attempts to send a payment as described within the passed diff --git a/rpcserver.go b/rpcserver.go index 29f40d7a..2f824de8 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -3966,7 +3966,7 @@ func (r *rpcServer) dispatchPaymentIntent( // Don't enable multi-part payments on the main rpc. // Users need to use routerrpc for that. - MaxShards: 1, + MaxParts: 1, } preImage, route, routerErr = r.server.chanRouter.SendPayment(