mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-05 10:39:03 +02:00
Merge pull request #3736 from joostjager/route-to-self
routing: allow route to self
This commit is contained in:
commit
949a5c5a04
@ -2084,6 +2084,10 @@ func paymentFlags() []cli.Flag {
|
||||
Name: "force, f",
|
||||
Usage: "will skip payment request confirmation",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "allow_self_payment",
|
||||
Usage: "allow sending a circular payment to self",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -2302,6 +2306,8 @@ func sendPaymentRequest(ctx *cli.Context, req *lnrpc.SendRequest) error {
|
||||
|
||||
req.CltvLimit = uint32(ctx.Int(cltvLimitFlag.Name))
|
||||
|
||||
req.AllowSelfPayment = ctx.Bool("allow_self_payment")
|
||||
|
||||
amt := req.Amt
|
||||
|
||||
if req.PaymentRequest != "" {
|
||||
|
@ -245,10 +245,12 @@ type SendPaymentRequest struct {
|
||||
//An optional field that can be used to pass an arbitrary set of TLV records
|
||||
//to a peer which understands the new records. This can be used to pass
|
||||
//application specific data during the payment attempt.
|
||||
DestTlv map[uint64][]byte `protobuf:"bytes,11,rep,name=dest_tlv,json=destTlv,proto3" json:"dest_tlv,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
DestTlv map[uint64][]byte `protobuf:"bytes,11,rep,name=dest_tlv,json=destTlv,proto3" json:"dest_tlv,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
/// If set, circular payments to self are permitted.
|
||||
AllowSelfPayment bool `protobuf:"varint,15,opt,name=allow_self_payment,json=allowSelfPayment,proto3" json:"allow_self_payment,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SendPaymentRequest) Reset() { *m = SendPaymentRequest{} }
|
||||
@ -374,6 +376,13 @@ func (m *SendPaymentRequest) GetDestTlv() map[uint64][]byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SendPaymentRequest) GetAllowSelfPayment() bool {
|
||||
if m != nil {
|
||||
return m.AllowSelfPayment
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type TrackPaymentRequest struct {
|
||||
/// The hash of the payment to look up.
|
||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||
@ -1496,133 +1505,135 @@ func init() {
|
||||
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
|
||||
|
||||
var fileDescriptor_7a0613f69d37b0a5 = []byte{
|
||||
// 2011 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0x5d, 0x73, 0x1a, 0xc9,
|
||||
0xd5, 0xde, 0x11, 0x20, 0xe0, 0x00, 0x62, 0xd4, 0x92, 0x65, 0x8c, 0xac, 0xb5, 0x76, 0xec, 0xd7,
|
||||
0xab, 0x72, 0x79, 0x25, 0xbf, 0x4a, 0xed, 0x96, 0x6b, 0x2f, 0x92, 0xc2, 0x30, 0xac, 0x46, 0x86,
|
||||
0x41, 0x6e, 0xc0, 0xbb, 0xce, 0x5e, 0x74, 0xb5, 0xa0, 0x25, 0xa6, 0x34, 0x1f, 0xec, 0x4c, 0xe3,
|
||||
0x58, 0xff, 0x21, 0xf9, 0x1d, 0xc9, 0x45, 0x72, 0x95, 0xff, 0x94, 0x54, 0xe5, 0x32, 0x55, 0xb9,
|
||||
0x4f, 0x75, 0xf7, 0x0c, 0x0c, 0x08, 0x79, 0x73, 0xc5, 0xf4, 0x73,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x2a, 0x8d, 0x31, 0xdc, 0x57, 0x28, 0x32,
|
||||
0xa0, 0x72, 0xc5, 0x18, 0x71, 0x1d, 0xcf, 0xe1, 0x44, 0x2c, 0x3f, 0x2f, 0x97, 0x5f, 0xba, 0x62,
|
||||
0xac, 0x23, 0xb0, 0x3e, 0xe5, 0xe8, 0x19, 0x6c, 0x2d, 0x38, 0x72, 0x8f, 0x15, 0x49, 0x2a, 0x27,
|
||||
0x24, 0xb9, 0xd1, 0x97, 0xa0, 0x07, 0x33, 0x7e, 0x1d, 0x38, 0xfe, 0x35, 0x19, 0x4d, 0xa8, 0x4f,
|
||||
0x9c, 0x71, 0xad, 0x70, 0xa8, 0x1d, 0x65, 0xdf, 0x6c, 0xbc, 0xd2, 0xf0, 0x56, 0x22, 0x6b, 0x4e,
|
||||
0xa8, 0x6f, 0x8d, 0xd1, 0x73, 0xa8, 0xba, 0x34, 0xe2, 0x64, 0x12, 0x4c, 0xc9, 0x74, 0x76, 0x79,
|
||||
0xc3, 0x6e, 0x6b, 0x5b, 0xf2, 0x64, 0x2a, 0x02, 0x3e, 0x0b, 0xa6, 0x17, 0x12, 0x44, 0x07, 0x00,
|
||||
0xf2, 0x54, 0xa4, 0xf1, 0x5a, 0x51, 0xee, 0xa1, 0x28, 0x10, 0x69, 0x18, 0x9d, 0x42, 0x49, 0x7a,
|
||||
0x93, 0x4c, 0x1c, 0x9f, 0x47, 0x35, 0x38, 0xcc, 0x1c, 0x95, 0x4e, 0xf5, 0x63, 0xd7, 0x17, 0x8e,
|
||||
0xc5, 0x42, 0x72, 0xe6, 0xf8, 0x1c, 0xa7, 0x49, 0xc8, 0x84, 0x82, 0x70, 0x23, 0xe1, 0xee, 0xc7,
|
||||
0x5a, 0x49, 0x4e, 0x78, 0x71, 0x3c, 0x0f, 0x89, 0xe3, 0xbb, 0x31, 0x70, 0xdc, 0x62, 0x11, 0x1f,
|
||||
0xb8, 0x1f, 0x4d, 0x9f, 0x87, 0xb7, 0x38, 0x3f, 0x56, 0xa3, 0xfa, 0xf7, 0x50, 0x4e, 0x0b, 0x44,
|
||||
0x54, 0x88, 0x5d, 0x88, 0x40, 0xc9, 0x62, 0xf1, 0x89, 0x76, 0x21, 0xf7, 0x91, 0xba, 0x33, 0x26,
|
||||
0x23, 0xa5, 0x8c, 0xd5, 0xe0, 0xfb, 0x8d, 0xd7, 0x9a, 0xf1, 0x1a, 0x76, 0x06, 0x21, 0x1d, 0xdd,
|
||||
0xac, 0x04, 0xdb, 0x6a, 0xac, 0x68, 0x77, 0x62, 0xc5, 0xf8, 0x8b, 0x06, 0x95, 0x78, 0x56, 0x9f,
|
||||
0x53, 0x3e, 0x8b, 0xd0, 0x37, 0x90, 0x8b, 0x38, 0xe5, 0x4c, 0xb2, 0xb7, 0x4e, 0x1f, 0xa6, 0xf6,
|
||||
0x92, 0x22, 0x32, 0xac, 0x58, 0xa8, 0x0e, 0x85, 0x69, 0xc8, 0x1c, 0x8f, 0x5e, 0x27, 0xeb, 0x9a,
|
||||
0x8f, 0x91, 0x01, 0x39, 0x39, 0x59, 0x06, 0x69, 0xe9, 0xb4, 0x9c, 0x3e, 0x47, 0xac, 0x44, 0xe8,
|
||||
0x08, 0x72, 0x13, 0xee, 0x8e, 0xa2, 0x5a, 0x56, 0x1e, 0x1d, 0x8a, 0x39, 0x67, 0x83, 0x4e, 0xb3,
|
||||
0xc1, 0x39, 0xf3, 0xa6, 0x1c, 0x2b, 0x82, 0xf1, 0x5b, 0xa8, 0xca, 0x99, 0x6d, 0xc6, 0x3e, 0x97,
|
||||
0x4d, 0x0f, 0x41, 0xe4, 0x8a, 0x8c, 0x3d, 0x95, 0x51, 0x9b, 0xd4, 0x13, 0x61, 0x67, 0x8c, 0x41,
|
||||
0x5f, 0xcc, 0x8f, 0xa6, 0x81, 0x1f, 0x09, 0xeb, 0xba, 0x58, 0x86, 0x88, 0x31, 0x11, 0x92, 0x32,
|
||||
0x18, 0x35, 0x39, 0x6b, 0x2b, 0xc6, 0xdb, 0x8c, 0xc9, 0x70, 0x7c, 0xae, 0x32, 0x80, 0xb8, 0xc1,
|
||||
0xe8, 0x46, 0xe4, 0x14, 0xbd, 0x8d, 0xd5, 0x57, 0x04, 0xdc, 0x09, 0x46, 0x37, 0x2d, 0x01, 0x1a,
|
||||
0x3f, 0xab, 0xb4, 0x1f, 0x04, 0x6a, 0x97, 0xff, 0xb3, 0x27, 0x16, 0x87, 0xb5, 0x71, 0xef, 0x61,
|
||||
0x19, 0x04, 0x76, 0x96, 0x94, 0xc7, 0xbb, 0x48, 0xfb, 0x40, 0x5b, 0xf1, 0xc1, 0x4b, 0xc8, 0x5f,
|
||||
0x51, 0xc7, 0x9d, 0x85, 0x89, 0x62, 0x94, 0x72, 0x68, 0x5b, 0x49, 0x70, 0x42, 0x31, 0xfe, 0x93,
|
||||
0x87, 0x7c, 0x0c, 0xa2, 0x53, 0xc8, 0x8e, 0x82, 0x71, 0x12, 0x07, 0x5f, 0xde, 0x9d, 0x96, 0xfc,
|
||||
0x36, 0x83, 0x31, 0xc3, 0x92, 0x8b, 0x7e, 0x07, 0x5b, 0x22, 0x57, 0x7d, 0xe6, 0x92, 0xd9, 0x74,
|
||||
0x4c, 0xe7, 0xae, 0xaf, 0xa5, 0x66, 0x37, 0x15, 0x61, 0x28, 0xe5, 0xb8, 0x32, 0x4a, 0x0f, 0xd1,
|
||||
0x3e, 0x14, 0x85, 0xb7, 0x95, 0x27, 0xb2, 0x32, 0xf6, 0x0b, 0x02, 0x90, 0x3e, 0x30, 0xa0, 0x12,
|
||||
0xf8, 0x4e, 0xe0, 0x93, 0x68, 0x42, 0xc9, 0xe9, 0xb7, 0xdf, 0xc9, 0x62, 0x55, 0xc6, 0x25, 0x09,
|
||||
0xf6, 0x27, 0xf4, 0xf4, 0xdb, 0xef, 0xd0, 0x13, 0x28, 0xc9, 0x04, 0x67, 0x9f, 0xa6, 0x4e, 0x78,
|
||||
0x2b, 0xab, 0x54, 0x05, 0xcb, 0x9c, 0x37, 0x25, 0x22,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xfa, 0x35,
|
||||
0x83, 0xd2, 0xad, 0xe7, 0x9a, 0x67, 0xce, 0x67, 0x75, 0xbd, 0x05, 0xdd, 0x8c, 0xb8, 0xe3, 0x89,
|
||||
0x56, 0x33, 0x6e, 0xfe, 0x51, 0x3d, 0xc5, 0x5f, 0x79, 0x51, 0xd4, 0xf7, 0xd7, 0xca, 0x62, 0x0f,
|
||||
0x75, 0xd4, 0x16, 0xe3, 0xf6, 0xfb, 0xce, 0x16, 0x97, 0x7b, 0xfe, 0xfa, 0x97, 0xf7, 0x89, 0x63,
|
||||
0x6d, 0x63, 0xd8, 0x59, 0x53, 0x9f, 0xd1, 0xff, 0xa5, 0x57, 0x70, 0x6f, 0x75, 0xaf, 0x3f, 0xff,
|
||||
0x35, 0xda, 0xc2, 0xca, 0x9a, 0x42, 0xbe, 0x64, 0xe5, 0xfe, 0x6b, 0x60, 0xc9, 0xca, 0xe7, 0xee,
|
||||
0x83, 0x9f, 0x41, 0x5f, 0x4d, 0x74, 0x64, 0xac, 0xce, 0xbd, 0x5b, 0x74, 0xea, 0x4f, 0x3f, 0xcb,
|
||||
0x89, 0x95, 0x5b, 0x00, 0x8b, 0x74, 0x41, 0x8f, 0x53, 0x53, 0xee, 0xa4, 0x7b, 0xfd, 0xe0, 0x1e,
|
||||
0xa9, 0x52, 0xf5, 0xe6, 0xff, 0x7f, 0x7f, 0x72, 0xed, 0xf0, 0xc9, 0xec, 0xf2, 0x78, 0x14, 0x78,
|
||||
0x27, 0xae, 0x68, 0xd8, 0x7d, 0xc7, 0xbf, 0xf6, 0x19, 0xff, 0x43, 0x10, 0xde, 0x9c, 0xb8, 0xfe,
|
||||
0xf8, 0x44, 0x66, 0xdd, 0xc9, 0x5c, 0xcb, 0xe5, 0xa6, 0xfc, 0x3f, 0xe7, 0x37, 0xff, 0x0d, 0x00,
|
||||
0x00, 0xff, 0xff, 0x7d, 0xd4, 0x80, 0xa8, 0xff, 0x11, 0x00, 0x00,
|
||||
// 2038 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0x51, 0x73, 0x1a, 0xc9,
|
||||
0x11, 0xbe, 0x15, 0x20, 0x50, 0x03, 0x62, 0x35, 0xd2, 0xc9, 0x6b, 0x64, 0x9d, 0x75, 0x6b, 0xc7,
|
||||
0x47, 0xb9, 0x7c, 0x92, 0xa3, 0xd4, 0x5d, 0xb9, 0xee, 0x21, 0x29, 0x0c, 0xcb, 0x69, 0x65, 0x58,
|
||||
0xe4, 0x01, 0x7c, 0xe7, 0xdc, 0xc3, 0xd4, 0x08, 0x46, 0x62, 0x4b, 0xcb, 0x2e, 0xb7, 0x3b, 0xf8,
|
||||
0xac, 0xff, 0x90, 0xbc, 0xe7, 0x1f, 0x24, 0x0f, 0xc9, 0x53, 0xfe, 0x53, 0xf2, 0x9e, 0xaa, 0xbc,
|
||||
0xa7, 0x66, 0x66, 0x17, 0x16, 0x84, 0x7c, 0x79, 0x62, 0xe7, 0xeb, 0x9e, 0xee, 0x99, 0xe9, 0x9e,
|
||||
0xaf, 0x7b, 0x80, 0xfd, 0x30, 0x98, 0x71, 0x16, 0x86, 0xd3, 0xe1, 0x89, 0xfa, 0x3a, 0x9e, 0x86,
|
||||
0x01, 0x0f, 0xd0, 0xd6, 0x1c, 0xaf, 0x6e, 0x85, 0xd3, 0xa1, 0x42, 0xcd, 0xbf, 0xe4, 0x00, 0xf5,
|
||||
0x98, 0x3f, 0xba, 0xa0, 0xb7, 0x13, 0xe6, 0x73, 0xcc, 0x7e, 0x9e, 0xb1, 0x88, 0x23, 0x04, 0xd9,
|
||||
0x11, 0x8b, 0xb8, 0xa1, 0x1d, 0x69, 0xb5, 0x12, 0x96, 0xdf, 0x48, 0x87, 0x0c, 0x9d, 0x70, 0x63,
|
||||
0xe3, 0x48, 0xab, 0x65, 0xb0, 0xf8, 0x44, 0x0f, 0xa1, 0x40, 0x27, 0x9c, 0x4c, 0x22, 0xca, 0x8d,
|
||||
0x92, 0x84, 0xf3, 0x74, 0xc2, 0x3b, 0x11, 0xe5, 0xe8, 0x4b, 0x28, 0x4d, 0x95, 0x49, 0x32, 0xa6,
|
||||
0xd1, 0xd8, 0xc8, 0x48, 0x43, 0xc5, 0x18, 0x3b, 0xa3, 0xd1, 0x18, 0xd5, 0x40, 0xbf, 0x72, 0x7d,
|
||||
0xea, 0x91, 0xa1, 0xc7, 0x3f, 0x90, 0x11, 0xf3, 0x38, 0x35, 0xb2, 0x47, 0x5a, 0x2d, 0x87, 0xb7,
|
||||
0x25, 0xde, 0xf0, 0xf8, 0x87, 0xa6, 0x40, 0xd1, 0x57, 0x50, 0x49, 0x8c, 0x85, 0x6a, 0x81, 0x46,
|
||||
0xee, 0x48, 0xab, 0x6d, 0xe1, 0xed, 0xe9, 0xf2, 0xb2, 0xbf, 0x82, 0x0a, 0x77, 0x27, 0x2c, 0x98,
|
||||
0x71, 0x12, 0xb1, 0x61, 0xe0, 0x8f, 0x22, 0x63, 0x53, 0x59, 0x8c, 0xe1, 0x9e, 0x42, 0x91, 0x09,
|
||||
0xe5, 0x2b, 0xc6, 0x88, 0xe7, 0x4e, 0x5c, 0x4e, 0xc4, 0xf2, 0xf3, 0x72, 0xf9, 0xc5, 0x2b, 0xc6,
|
||||
0xda, 0x02, 0xeb, 0x51, 0x8e, 0x9e, 0xc2, 0xf6, 0x42, 0x47, 0xee, 0xb1, 0x2c, 0x95, 0x4a, 0x89,
|
||||
0x92, 0xdc, 0xe8, 0x0b, 0xd0, 0x83, 0x19, 0xbf, 0x0e, 0x5c, 0xff, 0x9a, 0x0c, 0xc7, 0xd4, 0x27,
|
||||
0xee, 0xc8, 0x28, 0x1c, 0x69, 0xb5, 0xec, 0xeb, 0x8d, 0x97, 0x1a, 0xde, 0x4e, 0x64, 0x8d, 0x31,
|
||||
0xf5, 0xed, 0x11, 0x7a, 0x06, 0x15, 0x8f, 0x46, 0x9c, 0x8c, 0x83, 0x29, 0x99, 0xce, 0x2e, 0x6f,
|
||||
0xd8, 0xad, 0xb1, 0x2d, 0x4f, 0xa6, 0x2c, 0xe0, 0xb3, 0x60, 0x7a, 0x21, 0x41, 0x74, 0x08, 0x20,
|
||||
0x4f, 0x45, 0x3a, 0x37, 0xb6, 0xe4, 0x1e, 0xb6, 0x04, 0x22, 0x1d, 0xa3, 0x53, 0x28, 0xca, 0x68,
|
||||
0x92, 0xb1, 0xeb, 0xf3, 0xc8, 0x80, 0xa3, 0x4c, 0xad, 0x78, 0xaa, 0x1f, 0x7b, 0xbe, 0x08, 0x2c,
|
||||
0x16, 0x92, 0x33, 0xd7, 0xe7, 0x38, 0xad, 0x84, 0x2c, 0x28, 0x88, 0x30, 0x12, 0xee, 0x7d, 0x30,
|
||||
0x8a, 0x72, 0xc2, 0xf3, 0xe3, 0x79, 0x4a, 0x1c, 0xdf, 0xcd, 0x81, 0xe3, 0x26, 0x8b, 0x78, 0xdf,
|
||||
0xfb, 0x60, 0xf9, 0x3c, 0xbc, 0xc5, 0xf9, 0x91, 0x1a, 0xa1, 0x17, 0x80, 0xa8, 0xe7, 0x05, 0xbf,
|
||||
0x90, 0x88, 0x79, 0x57, 0x24, 0x3e, 0x7f, 0xa3, 0x72, 0xa4, 0xd5, 0x0a, 0x58, 0x97, 0x92, 0x1e,
|
||||
0xf3, 0xae, 0x62, 0x53, 0xd5, 0xef, 0xa0, 0x94, 0x36, 0x23, 0x72, 0x48, 0xec, 0x59, 0xa4, 0x55,
|
||||
0x16, 0x8b, 0x4f, 0xb4, 0x07, 0xb9, 0x0f, 0xd4, 0x9b, 0x31, 0x99, 0x57, 0x25, 0xac, 0x06, 0xdf,
|
||||
0x6d, 0xbc, 0xd2, 0xcc, 0x57, 0xb0, 0xdb, 0x0f, 0xe9, 0xf0, 0x66, 0x25, 0x35, 0x57, 0x33, 0x4b,
|
||||
0xbb, 0x93, 0x59, 0xe6, 0xdf, 0x34, 0x28, 0xc7, 0xb3, 0x7a, 0x9c, 0xf2, 0x59, 0x84, 0xbe, 0x86,
|
||||
0x5c, 0xc4, 0x29, 0x67, 0x52, 0x7b, 0xfb, 0xf4, 0x41, 0x6a, 0xe7, 0x29, 0x45, 0x86, 0x95, 0x16,
|
||||
0xaa, 0x42, 0x61, 0x1a, 0x32, 0x77, 0x42, 0xaf, 0x93, 0x75, 0xcd, 0xc7, 0xc8, 0x84, 0x9c, 0x9c,
|
||||
0x2c, 0x53, 0xba, 0x78, 0x5a, 0x4a, 0x9f, 0x3a, 0x56, 0x22, 0x54, 0x83, 0xdc, 0x98, 0x7b, 0xc3,
|
||||
0xc8, 0xc8, 0xca, 0x83, 0x46, 0xb1, 0xce, 0x59, 0xbf, 0xdd, 0xa8, 0x73, 0xce, 0x26, 0x53, 0x8e,
|
||||
0x95, 0x82, 0xf9, 0x7b, 0xa8, 0xc8, 0x99, 0x2d, 0xc6, 0x3e, 0x75, 0xf7, 0x1e, 0x80, 0xb8, 0x59,
|
||||
0x32, 0x53, 0xd5, 0xfd, 0xdb, 0xa4, 0x13, 0x91, 0xa4, 0xe6, 0x08, 0xf4, 0xc5, 0xfc, 0x68, 0x1a,
|
||||
0xf8, 0x91, 0xf0, 0xae, 0x8b, 0x65, 0x88, 0x8c, 0x14, 0x09, 0x2c, 0x53, 0x57, 0x93, 0xb3, 0xb6,
|
||||
0x63, 0xbc, 0xc5, 0x98, 0x4c, 0xde, 0x67, 0xea, 0xbe, 0x10, 0x2f, 0x18, 0xde, 0x88, 0x1b, 0x48,
|
||||
0x6f, 0x63, 0xf3, 0x65, 0x01, 0xb7, 0x83, 0xe1, 0x4d, 0x53, 0x80, 0xe6, 0x4f, 0x8a, 0x24, 0xfa,
|
||||
0x81, 0xda, 0xe5, 0xff, 0x1d, 0x89, 0xc5, 0x61, 0x6d, 0xdc, 0x7b, 0x58, 0x26, 0x81, 0xdd, 0x25,
|
||||
0xe3, 0xf1, 0x2e, 0xd2, 0x31, 0xd0, 0x56, 0x62, 0xf0, 0x02, 0xf2, 0x57, 0xd4, 0xf5, 0x66, 0x61,
|
||||
0x62, 0x18, 0xa5, 0x02, 0xda, 0x52, 0x12, 0x9c, 0xa8, 0x98, 0xff, 0xcd, 0x43, 0x3e, 0x06, 0xd1,
|
||||
0x29, 0x64, 0x87, 0xc1, 0x28, 0xc9, 0x83, 0x2f, 0xee, 0x4e, 0x4b, 0x7e, 0x1b, 0xc1, 0x88, 0x61,
|
||||
0xa9, 0x8b, 0xfe, 0x00, 0xdb, 0xe2, 0x66, 0xfb, 0xcc, 0x23, 0xb3, 0xe9, 0x88, 0xce, 0x43, 0x6f,
|
||||
0xa4, 0x66, 0x37, 0x94, 0xc2, 0x40, 0xca, 0x71, 0x79, 0x98, 0x1e, 0xa2, 0x03, 0xd8, 0x12, 0xd1,
|
||||
0x56, 0x91, 0xc8, 0xca, 0xdc, 0x2f, 0x08, 0x40, 0xc6, 0xc0, 0x84, 0x72, 0xe0, 0xbb, 0x81, 0x4f,
|
||||
0xa2, 0x31, 0x25, 0xa7, 0xdf, 0x7c, 0x2b, 0xa9, 0xad, 0x84, 0x8b, 0x12, 0xec, 0x8d, 0xe9, 0xe9,
|
||||
0x37, 0xdf, 0xa2, 0xc7, 0x50, 0x94, 0x74, 0xc0, 0x3e, 0x4e, 0xdd, 0xf0, 0x56, 0x72, 0x5a, 0x19,
|
||||
0x4b, 0x86, 0xb0, 0x24, 0x22, 0x6e, 0xd1, 0x95, 0x47, 0xaf, 0x23, 0xc9, 0x63, 0x65, 0xac, 0x06,
|
||||
0xe8, 0x25, 0xec, 0xc5, 0x67, 0x40, 0xa2, 0x60, 0x16, 0x0e, 0x19, 0x71, 0xfd, 0x11, 0xfb, 0x28,
|
||||
0xf9, 0xa9, 0x8c, 0x51, 0x2c, 0xeb, 0x49, 0x91, 0x2d, 0x24, 0x68, 0x1f, 0x36, 0xc7, 0xcc, 0xbd,
|
||||
0x1e, 0x2b, 0xce, 0x29, 0xe3, 0x78, 0x64, 0xfe, 0x3d, 0x07, 0xc5, 0xd4,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 0xd8, 0x47, 0x1e, 0x52, 0x12, 0x4c, 0xe9, 0xcf, 0x33, 0x46, 0x46,
|
||||
0x94, 0x53, 0xd9, 0x31, 0x96, 0x70, 0x45, 0x0a, 0xba, 0x12, 0x6f, 0x52, 0x4e, 0xcd, 0x47, 0x50,
|
||||
0xc5, 0x2c, 0x62, 0xbc, 0xe3, 0x46, 0x91, 0x1b, 0xf8, 0x8d, 0xc0, 0xe7, 0x61, 0xe0, 0xc5, 0x35,
|
||||
0xc7, 0x3c, 0x84, 0x83, 0xb5, 0x52, 0x55, 0x34, 0xc4, 0xe4, 0xb7, 0x33, 0x16, 0xde, 0xae, 0x9f,
|
||||
0xfc, 0x16, 0x0e, 0xd6, 0x4a, 0xe3, 0x8a, 0xf3, 0x02, 0x72, 0x53, 0xea, 0x86, 0x91, 0xb1, 0x21,
|
||||
0xab, 0xf6, 0xfe, 0x52, 0x93, 0xe0, 0x86, 0x67, 0x6e, 0xc4, 0x83, 0xf0, 0x16, 0x2b, 0xa5, 0xf3,
|
||||
0x6c, 0x41, 0xd3, 0x37, 0xcc, 0x3f, 0x69, 0x50, 0x4c, 0x09, 0x45, 0x1e, 0xf8, 0xc1, 0x88, 0x91,
|
||||
0xab, 0x30, 0x98, 0x24, 0x19, 0x36, 0x07, 0x90, 0x01, 0x79, 0x39, 0xe0, 0x41, 0x9c, 0x5e, 0xc9,
|
||||
0x10, 0x7d, 0x0d, 0xf9, 0xb1, 0x32, 0x21, 0xa3, 0x54, 0x3c, 0xdd, 0x5d, 0xf1, 0x2e, 0xce, 0x06,
|
||||
0x27, 0x3a, 0xe7, 0xd9, 0x42, 0x46, 0xcf, 0x9e, 0x67, 0x0b, 0x59, 0x3d, 0x77, 0x9e, 0x2d, 0xe4,
|
||||
0xf4, 0xcd, 0xf3, 0x6c, 0x61, 0x53, 0xcf, 0x9b, 0xff, 0xd1, 0xa0, 0x90, 0x68, 0x8b, 0xb5, 0x08,
|
||||
0x8a, 0x27, 0x22, 0x33, 0xe2,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c, 0x8c, 0x7e, 0x93, 0x5e, 0xc1, 0xbd, 0xec, 0x5e, 0x7d, 0xf6, 0x6b, 0x6a, 0x0b, 0x2f, 0x6b,
|
||||
0x88, 0x7c, 0xc9, 0xcb, 0xfd, 0x65, 0x60, 0xc9, 0xcb, 0xa7, 0xea, 0xc1, 0x4f, 0xa0, 0xaf, 0x5e,
|
||||
0x74, 0x64, 0xae, 0xce, 0xbd, 0x4b, 0x3a, 0xd5, 0x27, 0x9f, 0xd4, 0x89, 0x8d, 0xdb, 0x00, 0x8b,
|
||||
0xeb, 0x82, 0x1e, 0xa5, 0xa6, 0xdc, 0xb9, 0xee, 0xd5, 0xc3, 0x7b, 0xa4, 0xca, 0xd4, 0xeb, 0xdf,
|
||||
0xfe, 0xf1, 0xe4, 0xda, 0xe5, 0xe3, 0xd9, 0xe5, 0xf1, 0x30, 0x98, 0x9c, 0x78, 0xa2, 0x61, 0xf7,
|
||||
0x5d, 0xff, 0xda, 0x67, 0xfc, 0x97, 0x20, 0xbc, 0x39, 0xf1, 0xfc, 0xd1, 0x89, 0xbc, 0x75, 0x27,
|
||||
0x73, 0x2b, 0x97, 0x9b, 0xf2, 0xdf, 0x9f, 0xdf, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x28, 0xbb,
|
||||
0xdd, 0x1c, 0x2d, 0x12, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -100,6 +100,9 @@ message SendPaymentRequest {
|
||||
application specific data during the payment attempt.
|
||||
*/
|
||||
map<uint64, bytes> dest_tlv = 11;
|
||||
|
||||
/// If set, circular payments to self are permitted.
|
||||
bool allow_self_payment = 15;
|
||||
}
|
||||
|
||||
message TrackPaymentRequest {
|
||||
|
@ -665,6 +665,11 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
||||
|
||||
}
|
||||
|
||||
// Check for disallowed payments to self.
|
||||
if !rpcPayReq.AllowSelfPayment && payIntent.Target == r.SelfNode {
|
||||
return nil, errors.New("self-payments not allowed")
|
||||
}
|
||||
|
||||
return payIntent, nil
|
||||
}
|
||||
|
||||
|
1121
lnrpc/rpc.pb.go
1121
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load Diff
@ -956,6 +956,9 @@ message SendRequest {
|
||||
values must be encoded as base64.
|
||||
*/
|
||||
map<uint64, bytes> dest_tlv = 11;
|
||||
|
||||
/// If set, circular payments to self are permitted.
|
||||
bool allow_self_payment = 14;
|
||||
}
|
||||
|
||||
message SendResponse {
|
||||
|
@ -3717,6 +3717,11 @@
|
||||
"format": "byte"
|
||||
},
|
||||
"description": "* \nAn optional field that can be used to pass an arbitrary set of TLV records\nto a peer which understands the new records. This can be used to pass\napplication specific data during the payment attempt. When using REST, the\nvalues must be encoded as base64."
|
||||
},
|
||||
"allow_self_payment": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "/ If set, circular payments to self are permitted."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -381,11 +381,14 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
|
||||
// We can't always assume that the end destination is publicly
|
||||
// advertised to the network so we'll manually include the target node.
|
||||
// The target node charges no fee. Distance is set to 0, because this
|
||||
// is the starting point of the graph traversal. We are searching
|
||||
// backwards to get the fees first time right and correctly match
|
||||
// channel bandwidth.
|
||||
distance[target] = &nodeWithDist{
|
||||
// The target node charges no fee. Distance is set to 0, because this is
|
||||
// the starting point of the graph traversal. We are searching backwards
|
||||
// to get the fees first time right and correctly match channel
|
||||
// bandwidth.
|
||||
//
|
||||
// Don't record the initial partial path in the distance map and reserve
|
||||
// that key for the source key in the case we route to ourselves.
|
||||
partialPath := &nodeWithDist{
|
||||
dist: 0,
|
||||
weight: 0,
|
||||
node: target,
|
||||
@ -530,25 +533,12 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
// TODO(roasbeef): also add path caching
|
||||
// * similar to route caching, but doesn't factor in the amount
|
||||
|
||||
// To start, our target node will the sole item within our distance
|
||||
// heap.
|
||||
heap.Push(&nodeHeap, distance[target])
|
||||
|
||||
for nodeHeap.Len() != 0 {
|
||||
routeToSelf := source == target
|
||||
for {
|
||||
nodesVisited++
|
||||
|
||||
// Fetch the node within the smallest distance from our source
|
||||
// from the heap.
|
||||
partialPath := heap.Pop(&nodeHeap).(*nodeWithDist)
|
||||
pivot := partialPath.node
|
||||
|
||||
// If we've reached our source (or we don't have any incoming
|
||||
// edges), then we're done here and can exit the graph
|
||||
// traversal early.
|
||||
if pivot == source {
|
||||
break
|
||||
}
|
||||
|
||||
// Create unified policies for all incoming connections.
|
||||
u := newUnifiedPolicies(source, pivot, r.OutgoingChannelID)
|
||||
|
||||
@ -566,6 +556,15 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
// Expand all connections using the optimal policy for each
|
||||
// connection.
|
||||
for fromNode, unifiedPolicy := range u.policies {
|
||||
// The target node is not recorded in the distance map.
|
||||
// Therefore we need to have this check to prevent
|
||||
// creating a cycle. Only when we intend to route to
|
||||
// self, we allow this cycle to form. In that case we'll
|
||||
// also break out of the search loop below.
|
||||
if !routeToSelf && fromNode == target {
|
||||
continue
|
||||
}
|
||||
|
||||
// Apply last hop restriction if set.
|
||||
if r.LastHop != nil &&
|
||||
pivot == target && fromNode != *r.LastHop {
|
||||
@ -585,13 +584,28 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
// already have.
|
||||
processEdge(fromNode, policy, partialPath)
|
||||
}
|
||||
|
||||
if nodeHeap.Len() == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
// Fetch the node within the smallest distance from our source
|
||||
// from the heap.
|
||||
partialPath = heap.Pop(&nodeHeap).(*nodeWithDist)
|
||||
|
||||
// If we've reached our source (or we don't have any incoming
|
||||
// edges), then we're done here and can exit the graph
|
||||
// traversal early.
|
||||
if partialPath.node == source {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Use the distance map to unravel the forward path from source to
|
||||
// target.
|
||||
var pathEdges []*channeldb.ChannelEdgePolicy
|
||||
currentNode := source
|
||||
for currentNode != target { // TODO(roasbeef): assumes no cycles
|
||||
for {
|
||||
// Determine the next hop forward using the next map.
|
||||
currentNodeWithDist, ok := distance[currentNode]
|
||||
if !ok {
|
||||
@ -605,6 +619,13 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
|
||||
// Advance current node.
|
||||
currentNode = currentNodeWithDist.nextHop.Node.PubKeyBytes
|
||||
|
||||
// Check stop condition at the end of this loop. This prevents
|
||||
// breaking out too soon for self-payments that have target set
|
||||
// to source.
|
||||
if currentNode == target {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// The route is invalid if it spans more than 20 hops. The current
|
||||
|
@ -2154,6 +2154,123 @@ func testProbabilityRouting(t *testing.T, p10, p11, p20, minProbability float64,
|
||||
}
|
||||
}
|
||||
|
||||
// TestNoCycle tries to guide the path finding algorithm into reconstructing an
|
||||
// endless route. It asserts that the algorithm is able to handle this properly.
|
||||
func TestNoCycle(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Set up a test graph with two paths: source->a->target and
|
||||
// source->b->c->target. The fees are setup such that, searching
|
||||
// backwards, the algorithm will evaluate the following end of the route
|
||||
// first: ->target->c->target. This does not make sense, because if
|
||||
// target is reached, there is no need to continue to c. A proper
|
||||
// implementation will then go on with alternative routes. It will then
|
||||
// consider ->a->target because its cost is lower than the alternative
|
||||
// ->b->c->target and finally find source->a->target as the best route.
|
||||
testChannels := []*testChannel{
|
||||
symmetricTestChannel("source", "a", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
}, 1),
|
||||
symmetricTestChannel("source", "b", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
}, 2),
|
||||
symmetricTestChannel("b", "c", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
FeeBaseMsat: 2000,
|
||||
}, 3),
|
||||
symmetricTestChannel("c", "target", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
FeeBaseMsat: 0,
|
||||
}, 4),
|
||||
symmetricTestChannel("a", "target", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
FeeBaseMsat: 600,
|
||||
}, 5),
|
||||
}
|
||||
|
||||
ctx := newPathFindingTestContext(t, testChannels, "source")
|
||||
defer ctx.cleanup()
|
||||
|
||||
const (
|
||||
startingHeight = 100
|
||||
finalHopCLTV = 1
|
||||
)
|
||||
|
||||
paymentAmt := lnwire.NewMSatFromSatoshis(100)
|
||||
target := ctx.keyFromAlias("target")
|
||||
|
||||
// Find the best path given the restriction to only use channel 2 as the
|
||||
// outgoing channel.
|
||||
path, err := ctx.findPath(target, paymentAmt)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find path: %v", err)
|
||||
}
|
||||
route, err := newRoute(
|
||||
paymentAmt, ctx.source, path, startingHeight,
|
||||
finalHopCLTV, nil,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create path: %v", err)
|
||||
}
|
||||
|
||||
if len(route.Hops) != 2 {
|
||||
t.Fatalf("unexpected route")
|
||||
}
|
||||
if route.Hops[0].ChannelID != 1 {
|
||||
t.Fatalf("unexpected first hop")
|
||||
}
|
||||
if route.Hops[1].ChannelID != 5 {
|
||||
t.Fatalf("unexpected second hop")
|
||||
}
|
||||
}
|
||||
|
||||
// TestRouteToSelf tests that it is possible to find a route to the self node.
|
||||
func TestRouteToSelf(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testChannels := []*testChannel{
|
||||
symmetricTestChannel("source", "a", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
FeeBaseMsat: 500,
|
||||
}, 1),
|
||||
symmetricTestChannel("source", "b", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
FeeBaseMsat: 1000,
|
||||
}, 2),
|
||||
symmetricTestChannel("a", "b", 100000, &testChannelPolicy{
|
||||
Expiry: 144,
|
||||
FeeBaseMsat: 1000,
|
||||
}, 3),
|
||||
}
|
||||
|
||||
ctx := newPathFindingTestContext(t, testChannels, "source")
|
||||
defer ctx.cleanup()
|
||||
|
||||
paymentAmt := lnwire.NewMSatFromSatoshis(100)
|
||||
target := ctx.source
|
||||
|
||||
// Find the best path to self. We expect this to be source->a->source,
|
||||
// because a charges the lowest forwarding fee.
|
||||
path, err := ctx.findPath(target, paymentAmt)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find path: %v", err)
|
||||
}
|
||||
ctx.assertPath(path, []uint64{1, 1})
|
||||
|
||||
outgoingChanID := uint64(1)
|
||||
lastHop := ctx.keyFromAlias("b")
|
||||
ctx.restrictParams.OutgoingChannelID = &outgoingChanID
|
||||
ctx.restrictParams.LastHop = &lastHop
|
||||
|
||||
// Find the best path to self given that we want to go out via channel 1
|
||||
// and return through node b.
|
||||
path, err = ctx.findPath(target, paymentAmt)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find path: %v", err)
|
||||
}
|
||||
ctx.assertPath(path, []uint64{1, 3, 2})
|
||||
}
|
||||
|
||||
type pathFindingTestContext struct {
|
||||
t *testing.T
|
||||
graphParams graphParams
|
||||
@ -2221,3 +2338,17 @@ func (c *pathFindingTestContext) findPath(target route.Vertex,
|
||||
c.source, target, amt,
|
||||
)
|
||||
}
|
||||
|
||||
func (c *pathFindingTestContext) assertPath(path []*channeldb.ChannelEdgePolicy, expected []uint64) {
|
||||
if len(path) != len(expected) {
|
||||
c.t.Fatalf("expected path of length %v, but got %v",
|
||||
len(expected), len(path))
|
||||
}
|
||||
|
||||
for i, edge := range path {
|
||||
if edge.ChannelID != expected[i] {
|
||||
c.t.Fatalf("expected hop %v to be channel %v, "+
|
||||
"but got %v", i, expected[i], edge.ChannelID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
32
rpcserver.go
32
rpcserver.go
@ -487,6 +487,9 @@ type rpcServer struct {
|
||||
// macService is the macaroon service that we need to mint new
|
||||
// macaroons.
|
||||
macService *macaroons.Service
|
||||
|
||||
// selfNode is our own pubkey.
|
||||
selfNode route.Vertex
|
||||
}
|
||||
|
||||
// A compile time check to ensure that rpcServer fully implements the
|
||||
@ -662,6 +665,7 @@ func newRPCServer(s *server, macService *macaroons.Service,
|
||||
chanPredicate: chanPredicate,
|
||||
quit: make(chan struct{}, 1),
|
||||
macService: macService,
|
||||
selfNode: selfNode.PubKeyBytes,
|
||||
}
|
||||
lnrpc.RegisterLightningServer(grpcServer, rootRPCServer)
|
||||
|
||||
@ -3079,7 +3083,7 @@ type rpcPaymentIntent struct {
|
||||
// dispatch a client from the information presented by an RPC client. There are
|
||||
// three ways a client can specify their payment details: a payment request,
|
||||
// via manual details, or via a complete route.
|
||||
func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error) {
|
||||
func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error) {
|
||||
payIntent := rpcPaymentIntent{}
|
||||
|
||||
// If a route was specified, then we can use that directly.
|
||||
@ -3139,6 +3143,18 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error
|
||||
}
|
||||
}
|
||||
|
||||
validateDest := func(dest route.Vertex) error {
|
||||
if rpcPayReq.AllowSelfPayment {
|
||||
return nil
|
||||
}
|
||||
|
||||
if dest == r.selfNode {
|
||||
return errors.New("self-payments not allowed")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// If the payment request field isn't blank, then the details of the
|
||||
// invoice are encoded entirely within the encoded payReq. So we'll
|
||||
// attempt to decode it, populating the payment accordingly.
|
||||
@ -3190,6 +3206,10 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error
|
||||
payIntent.routeHints = payReq.RouteHints
|
||||
payIntent.payReq = []byte(rpcPayReq.PaymentRequest)
|
||||
|
||||
if err := validateDest(payIntent.dest); err != nil {
|
||||
return payIntent, err
|
||||
}
|
||||
|
||||
return payIntent, nil
|
||||
}
|
||||
|
||||
@ -3211,6 +3231,10 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error
|
||||
}
|
||||
copy(payIntent.dest[:], pubBytes)
|
||||
|
||||
if err := validateDest(payIntent.dest); err != nil {
|
||||
return payIntent, err
|
||||
}
|
||||
|
||||
// Otherwise, If the payment request field was not specified
|
||||
// (and a custom route wasn't specified), construct the payment
|
||||
// from the other fields.
|
||||
@ -3401,7 +3425,9 @@ func (r *rpcServer) sendPayment(stream *paymentStream) error {
|
||||
// fields. If the payment proto wasn't well
|
||||
// formed, then we'll send an error reply and
|
||||
// wait for the next payment.
|
||||
payIntent, err := extractPaymentIntent(nextPayment)
|
||||
payIntent, err := r.extractPaymentIntent(
|
||||
nextPayment,
|
||||
)
|
||||
if err != nil {
|
||||
if err := stream.send(&lnrpc.SendResponse{
|
||||
PaymentError: err.Error(),
|
||||
@ -3540,7 +3566,7 @@ func (r *rpcServer) sendPaymentSync(ctx context.Context,
|
||||
|
||||
// First we'll attempt to map the proto describing the next payment to
|
||||
// an intent that we can pass to local sub-systems.
|
||||
payIntent, err := extractPaymentIntent(nextPayment)
|
||||
payIntent, err := r.extractPaymentIntent(nextPayment)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user