Merge pull request #3744 from joostjager/enable-custom-records
lnrpc: re-enable custom records
This commit is contained in:
12 files changed
+864
-812
No files matched your search
@@ -562,12 +562,7 @@ func deserializeHop(r io.Reader) (*route.Hop, error) {
|
||||
tlvMap[tlvType] = rawRecordBytes
|
||||
}
|
||||
|
||||
tlvRecords, err := tlv.MapToRecords(tlvMap)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
h.TLVRecords = tlvRecords
|
||||
h.TLVRecords = tlv.MapToRecords(tlvMap)
|
||||
|
||||
return h, nil
|
||||
}
|
||||
|
||||
@@ -710,12 +710,7 @@ func deserializeHop(r io.Reader) (*route.Hop, error) {
|
||||
h.MPP = mpp
|
||||
}
|
||||
|
||||
tlvRecords, err := tlv.MapToRecords(tlvMap)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
h.TLVRecords = tlvRecords
|
||||
h.TLVRecords = tlv.MapToRecords(tlvMap)
|
||||
|
||||
return h, nil
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
// customTypeStart is the start of the custom tlv type range as defined
|
||||
// CustomTypeStart is the start of the custom tlv type range as defined
|
||||
// in BOLT 01.
|
||||
customTypeStart = 65536
|
||||
CustomTypeStart = 65536
|
||||
)
|
||||
|
||||
// String returns a human-readable description of the violation as a verb.
|
||||
@@ -249,7 +249,7 @@ func getMinRequiredViolation(set tlv.TypeSet) *tlv.Type {
|
||||
//
|
||||
// We always accept custom fields, because a higher level
|
||||
// application may understand them.
|
||||
if known || t%2 != 0 || t >= customTypeStart {
|
||||
if known || t%2 != 0 || t >= CustomTypeStart {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
+138
-135
@@ -249,8 +249,10 @@ 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"`
|
||||
//application specific data during the payment attempt. Record types are
|
||||
//required to be in the custom range >= 65536. When using REST, the values
|
||||
//must be encoded as base64.
|
||||
DestCustomRecords map[uint64][]byte `protobuf:"bytes,11,rep,name=dest_custom_records,json=destCustomRecords,proto3" json:"dest_custom_records,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:"-"`
|
||||
@@ -374,9 +376,9 @@ func (m *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SendPaymentRequest) GetDestTlv() map[uint64][]byte {
|
||||
func (m *SendPaymentRequest) GetDestCustomRecords() map[uint64][]byte {
|
||||
if m != nil {
|
||||
return m.DestTlv
|
||||
return m.DestCustomRecords
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1486,7 +1488,7 @@ func init() {
|
||||
proto.RegisterEnum("routerrpc.PaymentState", PaymentState_name, PaymentState_value)
|
||||
proto.RegisterEnum("routerrpc.Failure_FailureCode", Failure_FailureCode_name, Failure_FailureCode_value)
|
||||
proto.RegisterType((*SendPaymentRequest)(nil), "routerrpc.SendPaymentRequest")
|
||||
proto.RegisterMapType((map[uint64][]byte)(nil), "routerrpc.SendPaymentRequest.DestTlvEntry")
|
||||
proto.RegisterMapType((map[uint64][]byte)(nil), "routerrpc.SendPaymentRequest.DestCustomRecordsEntry")
|
||||
proto.RegisterType((*TrackPaymentRequest)(nil), "routerrpc.TrackPaymentRequest")
|
||||
proto.RegisterType((*PaymentStatus)(nil), "routerrpc.PaymentStatus")
|
||||
proto.RegisterType((*RouteFeeRequest)(nil), "routerrpc.RouteFeeRequest")
|
||||
@@ -1510,136 +1512,137 @@ func init() {
|
||||
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
|
||||
|
||||
var fileDescriptor_7a0613f69d37b0a5 = []byte{
|
||||
// 2053 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0x5f, 0x73, 0xdb, 0xc6,
|
||||
0x11, 0x0f, 0xc4, 0xff, 0x4b, 0x52, 0x84, 0x4e, 0x8a, 0x4c, 0x53, 0x56, 0xa2, 0x20, 0xae, 0xc3,
|
||||
0xf1, 0x38, 0x92, 0xab, 0x4e, 0x32, 0x9e, 0x3c, 0xb4, 0x43, 0x91, 0x60, 0x04, 0x99, 0x04, 0xe5,
|
||||
0x23, 0xe9, 0xc4, 0xcd, 0xc3, 0xcd, 0x89, 0x3c, 0x89, 0x18, 0x81, 0x00, 0x03, 0x1c, 0x1d, 0xeb,
|
||||
0x3b, 0xf4, 0x03, 0xf4, 0x1b, 0xb4, 0x0f, 0x6d, 0x5f, 0xfa, 0x9d, 0xda, 0xf7, 0xce, 0xf4, 0xbd,
|
||||
0x73, 0x77, 0x00, 0x09, 0x52, 0x94, 0xd3, 0x27, 0xe2, 0x7e, 0xbb, 0xb7, 0x7b, 0x77, 0xbb, 0xf7,
|
||||
0xdb, 0x3d, 0xc2, 0x7e, 0xe0, 0xcf, 0x39, 0x0b, 0x82, 0xd9, 0xe8, 0x44, 0x7d, 0x1d, 0xcf, 0x02,
|
||||
0x9f, 0xfb, 0xa8, 0xb0, 0xc0, 0x6b, 0x85, 0x60, 0x36, 0x52, 0xa8, 0xf1, 0xe7, 0x0c, 0xa0, 0x3e,
|
||||
0xf3, 0xc6, 0x97, 0xf4, 0x6e, 0xca, 0x3c, 0x8e, 0xd9, 0xcf, 0x73, 0x16, 0x72, 0x84, 0x20, 0x3d,
|
||||
0x66, 0x21, 0xaf, 0x6a, 0x47, 0x5a, 0xbd, 0x84, 0xe5, 0x37, 0xd2, 0x21, 0x45, 0xa7, 0xbc, 0xba,
|
||||
0x75, 0xa4, 0xd5, 0x53, 0x58, 0x7c, 0xa2, 0xc7, 0x90, 0xa7, 0x53, 0x4e, 0xa6, 0x21, 0xe5, 0xd5,
|
||||
0x92, 0x84, 0x73, 0x74, 0xca, 0xbb, 0x21, 0xe5, 0xe8, 0x0b, 0x28, 0xcd, 0x94, 0x49, 0x32, 0xa1,
|
||||
0xe1, 0xa4, 0x9a, 0x92, 0x86, 0x8a, 0x11, 0x76, 0x4e, 0xc3, 0x09, 0xaa, 0x83, 0x7e, 0xed, 0x78,
|
||||
0xd4, 0x25, 0x23, 0x97, 0xbf, 0x27, 0x63, 0xe6, 0x72, 0x5a, 0x4d, 0x1f, 0x69, 0xf5, 0x0c, 0xde,
|
||||
0x96, 0x78, 0xd3, 0xe5, 0xef, 0x5b, 0x02, 0x45, 0x5f, 0x41, 0x25, 0x36, 0x16, 0xa8, 0x05, 0x56,
|
||||
0x33, 0x47, 0x5a, 0xbd, 0x80, 0xb7, 0x67, 0xab, 0xcb, 0xfe, 0x0a, 0x2a, 0xdc, 0x99, 0x32, 0x7f,
|
||||
0xce, 0x49, 0xc8, 0x46, 0xbe, 0x37, 0x0e, 0xab, 0x59, 0x65, 0x31, 0x82, 0xfb, 0x0a, 0x45, 0x06,
|
||||
0x94, 0xaf, 0x19, 0x23, 0xae, 0x33, 0x75, 0x38, 0x11, 0xcb, 0xcf, 0xc9, 0xe5, 0x17, 0xaf, 0x19,
|
||||
0xeb, 0x08, 0xac, 0x4f, 0x39, 0x7a, 0x0a, 0xdb, 0x4b, 0x1d, 0xb9, 0xc7, 0xb2, 0x54, 0x2a, 0xc5,
|
||||
0x4a, 0x72, 0xa3, 0x2f, 0x40, 0xf7, 0xe7, 0xfc, 0xc6, 0x77, 0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 0x3f, 0xba, 0x6d, 0x09, 0xd0, 0xf8, 0x49, 0x91, 0xc4,
|
||||
0xc0, 0x57, 0xbb, 0xfc, 0xbf, 0x23, 0xb1, 0x3c, 0xac, 0xad, 0x07, 0x0f, 0xcb, 0x20, 0xb0, 0xbb,
|
||||
0x62, 0x3c, 0xda, 0x45, 0x32, 0x06, 0xda, 0x5a, 0x0c, 0x5e, 0x40, 0xee, 0x9a, 0x3a, 0xee, 0x3c,
|
||||
0x88, 0x0d, 0xa3, 0x44, 0x40, 0xdb, 0x4a, 0x82, 0x63, 0x15, 0xe3, 0xbf, 0x39, 0xc8, 0x45, 0x20,
|
||||
0x3a, 0x85, 0xf4, 0xc8, 0x1f, 0xc7, 0x79, 0xf0, 0xd9, 0xfd, 0x69, 0xf1, 0x6f, 0xd3, 0x1f, 0x33,
|
||||
0x2c, 0x75, 0xd1, 0x1f, 0x60, 0x5b, 0xdc, 0x6c, 0x8f, 0xb9, 0x64, 0x3e, 0x1b, 0xd3, 0x45, 0xe8,
|
||||
0xab, 0x89, 0xd9, 0x4d, 0xa5, 0x30, 0x94, 0x72, 0x5c, 0x1e, 0x25, 0x87, 0xe8, 0x00, 0x0a, 0x22,
|
||||
0xda, 0x2a, 0x12, 0x69, 0x99, 0xfb, 0x79, 0x01, 0xc8, 0x18, 0x18, 0x50, 0xf6, 0x3d, 0xc7, 0xf7,
|
||||
0x48, 0x38, 0xa1, 0xe4, 0xf4, 0x9b, 0x6f, 0x25, 0xb5, 0x95, 0x70, 0x51, 0x82, 0xfd, 0x09, 0x3d,
|
||||
0xfd, 0xe6, 0x5b, 0xf4, 0x39, 0x14, 0x25, 0x1d, 0xb0, 0x0f, 0x33, 0x27, 0xb8, 0x93, 0x9c, 0x56,
|
||||
0xc6, 0x92, 0x21, 0x4c, 0x89, 0x88, 0x5b, 0x74, 0xed, 0xd2, 0x9b, 0x50, 0xf2, 0x58, 0x19, 0xab,
|
||||
0x01, 0x7a, 0x09, 0x7b, 0xd1, 0x19, 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
||||
0x57, 0x64, 0x7b, 0x62, 0xd9, 0x4b, 0xd9, 0xfa, 0xb2, 0x3f, 0x45, 0x08, 0xb6, 0x13, 0x51, 0x69,
|
||||
0x37, 0xb0, 0xbe, 0x8f, 0xf6, 0xa0, 0x12, 0xaf, 0x20, 0x56, 0xfc, 0x57, 0x0e, 0x3d, 0x02, 0x34,
|
||||
0xb4, 0xb1, 0xd9, 0x68, 0x89, 0x03, 0x59, 0x08, 0xfe, 0x9d, 0xbb, 0x48, 0xe7, 0xb7, 0xf4, 0x94,
|
||||
0xf1, 0xcf, 0x14, 0x94, 0x57, 0xee, 0x25, 0x7a, 0x02, 0x85, 0xd0, 0xb9, 0xf1, 0x28, 0x17, 0xcc,
|
||||
0xa1, 0x48, 0x65, 0x09, 0xc8, 0xa2, 0x3b, 0xa1, 0x8e, 0xa7, 0xd8, 0x4c, 0xf1, 0x7e, 0x41, 0x22,
|
||||
0x92, 0xcb, 0x0e, 0x20, 0x17, 0x17, 0xf8, 0xd4, 0xa2, 0xc0, 0x67, 0x47, 0xaa, 0xb0, 0x3f, 0x81,
|
||||
0x82, 0xa0, 0xcc, 0x90, 0xd3, 0xe9, 0x4c, 0x5e, 0xf1, 0x32, 0x5e, 0x02, 0xe8, 0x4b, 0x28, 0x4f,
|
||||
0x59, 0x18, 0xd2, 0x1b, 0x46, 0xd4, 0x35, 0x05, 0xa9, 0x51, 0x8a, 0xc0, 0xb6, 0xbc, 0xad, 0x5f,
|
||||
0x42, 0x4c, 0x1b, 0x91, 0x52, 0x46, 0x29, 0x45, 0xa0, 0x52, 0x5a, 0x67, 0x6c, 0x4e, 0x23, 0x36,
|
||||
0x48, 0x32, 0x36, 0xa7, 0xe8, 0x39, 0xec, 0x28, 0xca, 0x71, 0x3c, 0x67, 0x3a, 0x9f, 0x2a, 0xea,
|
||||
0xc9, 0x49, 0xea, 0xa9, 0x48, 0xea, 0x51, 0xb8, 0x64, 0xa0, 0xc7, 0x90, 0xbf, 0xa2, 0x21, 0x13,
|
||||
0xc5, 0x22, 0xa2, 0x86, 0x9c, 0x18, 0xb7, 0x19, 0x13, 0x22, 0x51, 0x42, 0x02, 0x41, 0x7a, 0x8a,
|
||||
0x11, 0x72, 0xd7, 0x8c, 0x61, 0x71, 0x96, 0x0b, 0x0f, 0xf4, 0xc3, 0xd2, 0x43, 0x31, 0xe1, 0x41,
|
||||
0xe1, 0xd2, 0xc3, 0x73, 0xd8, 0x61, 0x1f, 0x78, 0x40, 0x89, 0x3f, 0xa3, 0x3f, 0xcf, 0x19, 0x19,
|
||||
0x53, 0x4e, 0x65, 0xc7, 0x58, 0xc2, 0x15, 0x29, 0xe8, 0x49, 0xbc, 0x45, 0x39, 0x35, 0x9e, 0x40,
|
||||
0x0d, 0xb3, 0x90, 0xf1, 0xae, 0x13, 0x86, 0x8e, 0xef, 0x35, 0x7d, 0x8f, 0x07, 0xbe, 0x1b, 0xd5,
|
||||
0x1c, 0xe3, 0x10, 0x0e, 0x36, 0x4a, 0x55, 0xd1, 0x10, 0x93, 0xdf, 0xcc, 0x59, 0x70, 0xb7, 0x79,
|
||||
0xf2, 0x1b, 0x38, 0xd8, 0x28, 0x8d, 0x2a, 0xce, 0x0b, 0xc8, 0xcc, 0xa8, 0x13, 0x84, 0xd5, 0x2d,
|
||||
0x59, 0xb5, 0xf7, 0x57, 0x9a, 0x04, 0x27, 0x38, 0x77, 0x42, 0xee, 0x07, 0x77, 0x58, 0x29, 0x5d,
|
||||
0xa4, 0xf3, 0x9a, 0xbe, 0x65, 0xfc, 0x49, 0x83, 0x62, 0x42, 0x28, 0xf2, 0xc0, 0xf3, 0xc7, 0x8c,
|
||||
0x5c, 0x07, 0xfe, 0x34, 0xce, 0xb0, 0x05, 0x80, 0xaa, 0x90, 0x93, 0x03, 0xee, 0x47, 0xe9, 0x15,
|
||||
0x0f, 0xd1, 0xd7, 0x90, 0x9b, 0x28, 0x13, 0x32, 0x4a, 0xc5, 0xd3, 0xdd, 0x35, 0xef, 0xe2, 0x6c,
|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xf6, 0xa6, 0x1b, 0xde,
|
||||
0x41, 0x1f, 0xb5, 0xf5, 0x1a, 0x74, 0x33, 0xe4, 0xce, 0x54, 0xf4, 0xa2, 0xd1, 0xeb, 0x00, 0xd5,
|
||||
0x12, 0xfa, 0x6b, 0x4f, 0x8e, 0xda, 0xc1, 0x46, 0x59, 0x14, 0xc2, 0x8e, 0xda, 0x62, 0xd4, 0x9f,
|
||||
0xdf, 0xdb, 0xe2, 0xea, 0xa3, 0xa0, 0xf6, 0xd9, 0x43, 0xe2, 0xc8, 0xda, 0x18, 0x76, 0x37, 0x10,
|
||||
0x38, 0xfa, 0x4d, 0x72, 0x05, 0x0f, 0xd2, 0x7f, 0xed, 0xd9, 0xaf, 0xa9, 0x2d, 0xbd, 0x6c, 0x60,
|
||||
0xfa, 0x15, 0x2f, 0x0f, 0xd7, 0x89, 0x15, 0x2f, 0x1f, 0x2b, 0x18, 0x3f, 0x81, 0xbe, 0xce, 0x04,
|
||||
0xc8, 0x58, 0x9f, 0x7b, 0x9f, 0x95, 0x6a, 0x5f, 0x7e, 0x54, 0x27, 0x32, 0x6e, 0x01, 0x2c, 0xef,
|
||||
0x13, 0x7a, 0x92, 0x98, 0x72, 0x8f, 0x0f, 0x6a, 0x87, 0x0f, 0x48, 0x95, 0xa9, 0xb3, 0xdf, 0xfe,
|
||||
0xf1, 0xe4, 0xc6, 0xe1, 0x93, 0xf9, 0xd5, 0xf1, 0xc8, 0x9f, 0x9e, 0xb8, 0xa2, 0xa3, 0xf7, 0x1c,
|
||||
0xef, 0xc6, 0x63, 0xfc, 0x17, 0x3f, 0xb8, 0x3d, 0x71, 0xbd, 0xf1, 0x89, 0xbc, 0x96, 0x27, 0x0b,
|
||||
0x2b, 0x57, 0x59, 0xf9, 0xf7, 0xd0, 0xef, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x2d, 0x5b,
|
||||
0xa8, 0x4e, 0x12, 0x00, 0x00,
|
||||
// 2065 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0xdd, 0x72, 0xdb, 0xc6,
|
||||
0x15, 0x0e, 0xc4, 0xff, 0x43, 0x52, 0x84, 0x56, 0x8a, 0x4c, 0x53, 0x56, 0xa2, 0x20, 0xae, 0xc3,
|
||||
0xf1, 0x38, 0x92, 0xab, 0x36, 0x19, 0x4f, 0x2f, 0xda, 0xa1, 0x48, 0x30, 0x82, 0x4c, 0x82, 0xf2,
|
||||
0x92, 0x74, 0xe2, 0xe6, 0x62, 0x67, 0x45, 0xae, 0x44, 0x8c, 0x40, 0x80, 0x01, 0x96, 0x8e, 0xf5,
|
||||
0x0e, 0x7d, 0x8f, 0xf6, 0xa2, 0xed, 0x4d, 0x9f, 0xa0, 0x2f, 0xd3, 0xde, 0x77, 0xa6, 0xf7, 0x9d,
|
||||
0xdd, 0x05, 0x48, 0x90, 0xa2, 0x9c, 0x5e, 0x89, 0xfb, 0x9d, 0x6f, 0xcf, 0x59, 0xec, 0x39, 0xfb,
|
||||
0xed, 0x59, 0xc1, 0x7e, 0xe0, 0xcf, 0x39, 0x0b, 0x82, 0xd9, 0xe8, 0x44, 0xfd, 0x3a, 0x9e, 0x05,
|
||||
0x3e, 0xf7, 0x51, 0x61, 0x81, 0xd7, 0x0a, 0xc1, 0x6c, 0xa4, 0x50, 0xe3, 0x9f, 0x19, 0x40, 0x7d,
|
||||
0xe6, 0x8d, 0x2f, 0xe9, 0xdd, 0x94, 0x79, 0x1c, 0xb3, 0x9f, 0xe6, 0x2c, 0xe4, 0x08, 0x41, 0x7a,
|
||||
0xcc, 0x42, 0x5e, 0xd5, 0x8e, 0xb4, 0x7a, 0x09, 0xcb, 0xdf, 0x48, 0x87, 0x14, 0x9d, 0xf2, 0xea,
|
||||
0xd6, 0x91, 0x56, 0x4f, 0x61, 0xf1, 0x13, 0x3d, 0x86, 0x3c, 0x9d, 0x72, 0x32, 0x0d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 0xbd, 0x04, 0xb5, 0x7b, 0x25, 0x68,
|
||||
0xfc, 0x45, 0x83, 0x72, 0x34, 0xab, 0xcf, 0x29, 0x9f, 0x87, 0xe8, 0x6b, 0xc8, 0x84, 0x9c, 0x72,
|
||||
0x26, 0xd9, 0xdb, 0xa7, 0x8f, 0x12, 0xfb, 0x92, 0x20, 0x32, 0xac, 0x58, 0xa8, 0x06, 0xf9, 0x59,
|
||||
0xc0, 0x9c, 0x29, 0xbd, 0x89, 0xd7, 0xb5, 0x18, 0x23, 0x03, 0x32, 0x72, 0xb2, 0xac, 0xfd, 0xe2,
|
||||
0x69, 0x29, 0x99, 0x1e, 0xac, 0x4c, 0xa8, 0x0e, 0x99, 0x09, 0x77, 0x47, 0x61, 0x35, 0x2d, 0xd3,
|
||||
0x80, 0x22, 0xce, 0xf9, 0xa0, 0xd3, 0x6c, 0x70, 0xce, 0xa6, 0x33, 0x8e, 0x15, 0xc1, 0xf8, 0x3d,
|
||||
0x54, 0xe4, 0xcc, 0x36, 0x63, 0x1f, 0x3b, 0xa4, 0x8f, 0x40, 0x1c, 0x41, 0x59, 0xd2, 0xea, 0xa0,
|
||||
0x66, 0xe9, 0x54, 0x54, 0xb3, 0x31, 0x06, 0x7d, 0x39, 0x3f, 0x9c, 0xf9, 0x5e, 0x28, 0xa2, 0xeb,
|
||||
0x62, 0x19, 0xa2, 0x74, 0x45, 0xa5, 0xcb, 0x1a, 0xd7, 0xe4, 0xac, 0xed, 0x08, 0x6f, 0x33, 0x26,
|
||||
0xab, 0xfc, 0x99, 0x3a, 0x58, 0xc4, 0xf5, 0x47, 0xb7, 0xe2, 0xa8, 0xd2, 0xbb, 0xc8, 0x7d, 0x59,
|
||||
0xc0, 0x1d, 0x7f, 0x74, 0xdb, 0x12, 0xa0, 0xf1, 0xa3, 0x52, 0x93, 0x81, 0xaf, 0xbe, 0xf2, 0xff,
|
||||
0xce, 0xc4, 0x72, 0xb3, 0xb6, 0x1e, 0xdc, 0x2c, 0x83, 0xc0, 0xee, 0x8a, 0xf3, 0xe8, 0x2b, 0x92,
|
||||
0x39, 0xd0, 0xd6, 0x72, 0xf0, 0x02, 0x72, 0xd7, 0xd4, 0x71, 0xe7, 0x41, 0xec, 0x18, 0x25, 0x12,
|
||||
0xda, 0x56, 0x16, 0x1c, 0x53, 0x8c, 0xff, 0xe6, 0x20, 0x17, 0x81, 0xe8, 0x14, 0xd2, 0x23, 0x7f,
|
||||
0x1c, 0xd7, 0xc1, 0x67, 0xf7, 0xa7, 0xc5, 0x7f, 0x9b, 0xfe, 0x98, 0x61, 0xc9, 0x45, 0x7f, 0x80,
|
||||
0x6d, 0x21, 0x01, 0x1e, 0x73, 0xc9, 0x7c, 0x36, 0xa6, 0x8b, 0xd4, 0x57, 0x13, 0xb3, 0x9b, 0x8a,
|
||||
0x30, 0x94, 0x76, 0x5c, 0x1e, 0x25, 0x87, 0xe8, 0x00, 0x0a, 0x22, 0xdb, 0x2a, 0x13, 0x69, 0x59,
|
||||
0xfb, 0x79, 0x01, 0xc8, 0x1c, 0x18, 0x50, 0xf6, 0x3d, 0xc7, 0xf7, 0x48, 0x38, 0xa1, 0xe4, 0xf4,
|
||||
0x9b, 0x6f, 0xa5, 0x06, 0x96, 0x70, 0x51, 0x82, 0xfd, 0x09, 0x3d, 0xfd, 0xe6, 0x5b, 0xf4, 0x39,
|
||||
0x14, 0xa5, 0x6e, 0xb0, 0x0f, 0x33, 0x27, 0xb8, 0x93, 0xe2, 0x57, 0xc6, 0x52, 0x4a, 0x4c, 0x89,
|
||||
0x88, 0x53, 0x74, 0xed, 0xd2, 0x9b, 0x50, 0x0a, 0x5e, 0x19, 0xab, 0x01, 0x7a, 0x09, 0x7b, 0xd1,
|
||||
0x1e, 0x90, 0xd0, 0x9f, 0x07, 0x23, 0x46, 0x1c, 0x6f, 0xcc, 0x3e, 0x48, 0x21, 0x2b, 0x63, 0x14,
|
||||
0xd9, 0xfa, 0xd2, 0x64, 0x09, 0x0b, 0xda, 0x87, 0xec,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, 0xf8, 0xaf, 0x1c, 0x7a, 0x04, 0x68, 0x68, 0x63, 0xb3, 0xd1, 0x12, 0x1b,
|
||||
0xb2, 0x30, 0xfc, 0x3b, 0x77, 0x91, 0xce, 0x6f, 0xe9, 0x29, 0xe3, 0x1f, 0x29, 0x28, 0xaf, 0x9c,
|
||||
0x4b, 0xf4, 0x04, 0x0a, 0xa1, 0x73, 0xe3, 0x51, 0x2e, 0x94, 0x43, 0x89, 0xca, 0x12, 0x90, 0xb7,
|
||||
0xf3, 0x84, 0x3a, 0x9e, 0x52, 0x33, 0xa5, 0xfb, 0x05, 0x89, 0x48, 0x2d, 0x3b, 0x80, 0x5c, 0xdc,
|
||||
0x09, 0xa4, 0x16, 0x9d, 0x40, 0x76, 0xa4, 0x3a, 0x80, 0x27, 0x50, 0x10, 0x92, 0x19, 0x72, 0x3a,
|
||||
0x9d, 0xc9, 0x23, 0x5e, 0xc6, 0x4b, 0x00, 0x7d, 0x09, 0xe5, 0x29, 0x0b, 0x43, 0x7a, 0xc3, 0x88,
|
||||
0x3a, 0xa6, 0x20, 0x19, 0xa5, 0x08, 0x6c, 0xcb, 0xd3, 0xfa, 0x25, 0xc4, 0xb2, 0x11, 0x91, 0x32,
|
||||
0x8a, 0x14, 0x81, 0x8a, 0xb4, 0xae, 0xd8, 0x9c, 0x46, 0x6a, 0x90, 0x54, 0x6c, 0x4e, 0xd1, 0x73,
|
||||
0xd8, 0x51, 0x92, 0xe3, 0x78, 0xce, 0x74, 0x3e, 0x55, 0xd2, 0x93, 0x93, 0xd2, 0x53, 0x91, 0xd2,
|
||||
0xa3, 0x70, 0xa9, 0x40, 0x8f, 0x21, 0x7f, 0x45, 0x43, 0x26, 0x2e, 0x8b, 0x48, 0x1a, 0x72, 0x62,
|
||||
0xdc, 0x66, 0x4c, 0x98, 0xc4, 0x15, 0x12, 0x08, 0xd1, 0x53, 0x8a, 0x90, 0xbb, 0x66, 0x0c, 0x8b,
|
||||
0xbd, 0x5c, 0x44, 0xa0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 0x47,
|
||||
0xed, 0x60, 0xa3, 0x2d, 0x4a, 0x61, 0x47, 0x7d, 0x62, 0xd4, 0x9f, 0xdf, 0xfb, 0xc4, 0xd5, 0x47,
|
||||
0x41, 0xed, 0xb3, 0x87, 0xcc, 0x91, 0xb7, 0x31, 0xec, 0x6e, 0x10, 0x70, 0xf4, 0xab, 0xe4, 0x0a,
|
||||
0x1e, 0x94, 0xff, 0xda, 0xb3, 0x5f, 0xa2, 0x2d, 0xa3, 0x6c, 0x50, 0xfa, 0x95, 0x28, 0x0f, 0xdf,
|
||||
0x13, 0x2b, 0x51, 0x3e, 0x76, 0x61, 0xfc, 0x08, 0xfa, 0xba, 0x12, 0x20, 0x63, 0x7d, 0xee, 0x7d,
|
||||
0x55, 0xaa, 0x7d, 0xf9, 0x51, 0x4e, 0xe4, 0xdc, 0x02, 0x58, 0x9e, 0x27, 0xf4, 0x24, 0x31, 0xe5,
|
||||
0x9e, 0x1e, 0xd4, 0x0e, 0x1f, 0xb0, 0x2a, 0x57, 0x67, 0xbf, 0xfe, 0xe3, 0xc9, 0x8d, 0xc3, 0x27,
|
||||
0xf3, 0xab, 0xe3, 0x91, 0x3f, 0x3d, 0x71, 0x45, 0x47, 0xef, 0x39, 0xde, 0x8d, 0xc7, 0xf8, 0xcf,
|
||||
0x7e, 0x70, 0x7b, 0xe2, 0x7a, 0xe3, 0x13, 0x79, 0x2c, 0x4f, 0x16, 0x5e, 0xae, 0xb2, 0xf2, 0xff,
|
||||
0x48, 0xbf, 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0xfb, 0xd9, 0x67, 0x77, 0x12, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -97,9 +97,11 @@ message SendPaymentRequest {
|
||||
/**
|
||||
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.
|
||||
application specific data during the payment attempt. Record types are
|
||||
required to be in the custom range >= 65536. When using REST, the values
|
||||
must be encoded as base64.
|
||||
*/
|
||||
map<uint64, bytes> dest_tlv = 11;
|
||||
map<uint64, bytes> dest_custom_records = 11;
|
||||
|
||||
/// If set, circular payments to self are permitted.
|
||||
bool allow_self_payment = 15;
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/htlcswitch/hop"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
@@ -200,7 +201,6 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
|
||||
}
|
||||
cltvLimit -= uint32(finalCLTVDelta)
|
||||
|
||||
var destTLV map[uint64][]byte
|
||||
restrictions := &routing.RestrictParams{
|
||||
FeeLimit: feeLimit,
|
||||
ProbabilitySource: func(fromNode, toNode route.Vertex,
|
||||
@@ -226,14 +226,14 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
|
||||
fromNode, toNode, amt,
|
||||
)
|
||||
},
|
||||
DestPayloadTLV: len(destTLV) != 0,
|
||||
DestPayloadTLV: len(in.DestCustomRecords) != 0,
|
||||
CltvLimit: cltvLimit,
|
||||
}
|
||||
|
||||
// If we have any TLV records destined for the final hop, then we'll
|
||||
// attempt to decode them now into a form that the router can more
|
||||
// easily manipulate.
|
||||
destTlvRecords, err := tlv.MapToRecords(destTLV)
|
||||
destTlvRecords, err := UnmarshallCustomRecords(in.DestCustomRecords)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -347,6 +347,11 @@ func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error)
|
||||
}
|
||||
}
|
||||
|
||||
tlvMap, err := tlv.RecordsToMap(hop.TLVRecords)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp.Hops[i] = &lnrpc.Hop{
|
||||
ChanId: hop.ChannelID,
|
||||
ChanCapacity: int64(chanCapacity),
|
||||
@@ -358,8 +363,9 @@ func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error)
|
||||
PubKey: hex.EncodeToString(
|
||||
hop.PubKeyBytes[:],
|
||||
),
|
||||
TlvPayload: !hop.LegacyPayload,
|
||||
MppRecord: mpp,
|
||||
CustomRecords: tlvMap,
|
||||
TlvPayload: !hop.LegacyPayload,
|
||||
MppRecord: mpp,
|
||||
}
|
||||
incomingAmt = hop.AmtToForward
|
||||
}
|
||||
@@ -367,90 +373,87 @@ func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// UnmarshallHopByChannelLookup unmarshalls an rpc hop for which the pub key is
|
||||
// not known. This function will query the channel graph with channel id to
|
||||
// retrieve both endpoints and determine the hop pubkey using the previous hop
|
||||
// pubkey. If the channel is unknown, an error is returned.
|
||||
func (r *RouterBackend) UnmarshallHopByChannelLookup(hop *lnrpc.Hop,
|
||||
prevPubKeyBytes [33]byte) (*route.Hop, error) {
|
||||
// UnmarshallCustomRecords unmarshall rpc custom records to tlv records.
|
||||
func UnmarshallCustomRecords(rpcRecords map[uint64][]byte) ([]tlv.Record,
|
||||
error) {
|
||||
|
||||
// Discard edge policies, because they may be nil.
|
||||
node1, node2, err := r.FetchChannelEndpoints(hop.ChanId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if len(rpcRecords) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var pubKeyBytes [33]byte
|
||||
switch {
|
||||
case prevPubKeyBytes == node1:
|
||||
pubKeyBytes = node2
|
||||
case prevPubKeyBytes == node2:
|
||||
pubKeyBytes = node1
|
||||
default:
|
||||
return nil, fmt.Errorf("channel edge does not match expected node")
|
||||
tlvRecords := tlv.MapToRecords(rpcRecords)
|
||||
|
||||
// tlvRecords is sorted, so we only need to check that the first
|
||||
// element is within the custom range.
|
||||
if uint64(tlvRecords[0].Type()) < hop.CustomTypeStart {
|
||||
return nil, fmt.Errorf("no custom records with types "+
|
||||
"below %v allowed", hop.CustomTypeStart)
|
||||
}
|
||||
|
||||
var tlvRecords []tlv.Record
|
||||
|
||||
mpp, err := UnmarshalMPP(hop.MppRecord)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &route.Hop{
|
||||
OutgoingTimeLock: hop.Expiry,
|
||||
AmtToForward: lnwire.MilliSatoshi(hop.AmtToForwardMsat),
|
||||
PubKeyBytes: pubKeyBytes,
|
||||
ChannelID: hop.ChanId,
|
||||
TLVRecords: tlvRecords,
|
||||
LegacyPayload: !hop.TlvPayload,
|
||||
MPP: mpp,
|
||||
}, nil
|
||||
return tlvRecords, nil
|
||||
}
|
||||
|
||||
// UnmarshallKnownPubkeyHop unmarshalls an rpc hop that contains the hop pubkey.
|
||||
// The channel graph doesn't need to be queried because all information required
|
||||
// for sending the payment is present.
|
||||
func UnmarshallKnownPubkeyHop(hop *lnrpc.Hop) (*route.Hop, error) {
|
||||
pubKey, err := hex.DecodeString(hop.PubKey)
|
||||
// UnmarshallHopWithPubkey unmarshalls an rpc hop for which the pubkey has
|
||||
// already been extracted.
|
||||
func UnmarshallHopWithPubkey(rpcHop *lnrpc.Hop, pubkey route.Vertex) (*route.Hop,
|
||||
error) {
|
||||
|
||||
tlvRecords, err := UnmarshallCustomRecords(rpcHop.CustomRecords)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot decode pubkey %s", hop.PubKey)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var pubKeyBytes [33]byte
|
||||
copy(pubKeyBytes[:], pubKey)
|
||||
|
||||
var tlvRecords []tlv.Record
|
||||
|
||||
mpp, err := UnmarshalMPP(hop.MppRecord)
|
||||
mpp, err := UnmarshalMPP(rpcHop.MppRecord)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &route.Hop{
|
||||
OutgoingTimeLock: hop.Expiry,
|
||||
AmtToForward: lnwire.MilliSatoshi(hop.AmtToForwardMsat),
|
||||
PubKeyBytes: pubKeyBytes,
|
||||
ChannelID: hop.ChanId,
|
||||
OutgoingTimeLock: rpcHop.Expiry,
|
||||
AmtToForward: lnwire.MilliSatoshi(rpcHop.AmtToForwardMsat),
|
||||
PubKeyBytes: pubkey,
|
||||
ChannelID: rpcHop.ChanId,
|
||||
TLVRecords: tlvRecords,
|
||||
LegacyPayload: !hop.TlvPayload,
|
||||
LegacyPayload: !rpcHop.TlvPayload,
|
||||
MPP: mpp,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UnmarshallHop unmarshalls an rpc hop that may or may not contain a node
|
||||
// pubkey.
|
||||
func (r *RouterBackend) UnmarshallHop(hop *lnrpc.Hop,
|
||||
func (r *RouterBackend) UnmarshallHop(rpcHop *lnrpc.Hop,
|
||||
prevNodePubKey [33]byte) (*route.Hop, error) {
|
||||
|
||||
if hop.PubKey == "" {
|
||||
// If no pub key is given of the hop, the local channel
|
||||
// graph needs to be queried to complete the information
|
||||
// necessary for routing.
|
||||
return r.UnmarshallHopByChannelLookup(hop, prevNodePubKey)
|
||||
var pubKeyBytes [33]byte
|
||||
if rpcHop.PubKey != "" {
|
||||
// Unmarshall the provided hop pubkey.
|
||||
pubKey, err := hex.DecodeString(rpcHop.PubKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot decode pubkey %s",
|
||||
rpcHop.PubKey)
|
||||
}
|
||||
copy(pubKeyBytes[:], pubKey)
|
||||
} else {
|
||||
// If no pub key is given of the hop, the local channel graph
|
||||
// needs to be queried to complete the information necessary for
|
||||
// routing. Discard edge policies, because they may be nil.
|
||||
node1, node2, err := r.FetchChannelEndpoints(rpcHop.ChanId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch {
|
||||
case prevNodePubKey == node1:
|
||||
pubKeyBytes = node2
|
||||
case prevNodePubKey == node2:
|
||||
pubKeyBytes = node1
|
||||
default:
|
||||
return nil, fmt.Errorf("channel edge does not match " +
|
||||
"expected node")
|
||||
}
|
||||
}
|
||||
|
||||
return UnmarshallKnownPubkeyHop(hop)
|
||||
return UnmarshallHopWithPubkey(rpcHop, pubKeyBytes)
|
||||
}
|
||||
|
||||
// UnmarshallRoute unmarshalls an rpc route. For hops that don't specify a
|
||||
@@ -531,13 +534,11 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
||||
return nil, errors.New("timeout_seconds must be specified")
|
||||
}
|
||||
|
||||
var destTLV map[uint64][]byte
|
||||
if len(destTLV) != 0 {
|
||||
var err error
|
||||
payIntent.FinalDestRecords, err = tlv.MapToRecords(destTLV)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payIntent.FinalDestRecords, err = UnmarshallCustomRecords(
|
||||
rpcPayReq.DestCustomRecords,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
payIntent.PayAttemptTimeout = time.Second *
|
||||
|
||||
+604
-569
File diff suppressed because it is too large.
Load diff
+23
-4
@@ -952,10 +952,11 @@ message SendRequest {
|
||||
/**
|
||||
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. When using REST, the
|
||||
values must be encoded as base64.
|
||||
application specific data during the payment attempt. Record types are
|
||||
required to be in the custom range >= 65536. When using REST, the values
|
||||
must be encoded as base64.
|
||||
*/
|
||||
map<uint64, bytes> dest_tlv = 11;
|
||||
map<uint64, bytes> dest_custom_records = 11;
|
||||
|
||||
/// If set, circular payments to self are permitted.
|
||||
bool allow_self_payment = 14;
|
||||
@@ -1857,6 +1858,16 @@ message QueryRoutesRequest {
|
||||
zero, then the value of `--max-cltv-expiry` is used as the limit.
|
||||
*/
|
||||
uint32 cltv_limit = 11;
|
||||
|
||||
/**
|
||||
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. If the destination
|
||||
does not support the specified recrods, and error will be returned.
|
||||
Record types are required to be in the custom range >= 65536. When using
|
||||
REST, the values must be encoded as base64.
|
||||
*/
|
||||
map<uint64, bytes> dest_custom_records = 13;
|
||||
}
|
||||
|
||||
message NodePair {
|
||||
@@ -1922,7 +1933,8 @@ message Hop {
|
||||
|
||||
/**
|
||||
If set to true, then this hop will be encoded using the new variable length
|
||||
TLV format.
|
||||
TLV format. Note that if any custom tlv_records below are specified, then
|
||||
this field MUST be set to true for them to be encoded properly.
|
||||
*/
|
||||
bool tlv_payload = 9 [json_name = "tlv_payload"];
|
||||
|
||||
@@ -1933,6 +1945,13 @@ message Hop {
|
||||
regular single-shot payment is or was attempted.
|
||||
*/
|
||||
MPPRecord mpp_record = 10 [json_name = "mpp_record"];
|
||||
|
||||
/**
|
||||
An optional set of key-value TLV records. This is useful within the context
|
||||
of the SendToRoute call as it allows callers to specify arbitrary K-V pairs
|
||||
to drop off at each hop within the onion.
|
||||
*/
|
||||
map<uint64, bytes> custom_records = 11 [json_name = "custom_records"];
|
||||
}
|
||||
|
||||
message MPPRecord {
|
||||
|
||||
+11
-3
@@ -2582,11 +2582,19 @@
|
||||
"tlv_payload": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "* \nIf set to true, then this hop will be encoded using the new variable length\nTLV format."
|
||||
"description": "* \nIf set to true, then this hop will be encoded using the new variable length\nTLV format. Note that if any custom tlv_records below are specified, then\nthis field MUST be set to true for them to be encoded properly."
|
||||
},
|
||||
"mpp_record": {
|
||||
"$ref": "#/definitions/lnrpcMPPRecord",
|
||||
"description": "*\nAn optional TLV record tha singals the use of an MPP payment. If present,\nthe receiver will enforce that that the same mpp_record is included in the\nfinal hop payload of all non-zero payments in the HTLC set. If empty, a\nregular single-shot payment is or was attempted."
|
||||
},
|
||||
"custom_records": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
},
|
||||
"description": "*\nAn optional set of key-value TLV records. This is useful within the context\nof the SendToRoute call as it allows callers to specify arbitrary K-V pairs\nto drop off at each hop within the onion."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3710,13 +3718,13 @@
|
||||
"format": "int64",
|
||||
"description": "* \nAn optional maximum total time lock for the route. This should not exceed\nlnd's `--max-cltv-expiry` setting. If zero, then the value of\n`--max-cltv-expiry` is enforced."
|
||||
},
|
||||
"dest_tlv": {
|
||||
"dest_custom_records": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"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."
|
||||
"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. Record types are\nrequired to be in the custom range \u003e= 65536. When using REST, the values\nmust be encoded as base64."
|
||||
},
|
||||
"allow_self_payment": {
|
||||
"type": "boolean",
|
||||
|
||||
+5
-8
@@ -3133,14 +3133,11 @@ func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPayme
|
||||
}
|
||||
payIntent.cltvLimit = cltvLimit
|
||||
|
||||
if len(rpcPayReq.DestTlv) != 0 {
|
||||
var err error
|
||||
payIntent.destTLV, err = tlv.MapToRecords(
|
||||
rpcPayReq.DestTlv,
|
||||
)
|
||||
if err != nil {
|
||||
return payIntent, err
|
||||
}
|
||||
payIntent.destTLV, err = routerrpc.UnmarshallCustomRecords(
|
||||
rpcPayReq.DestCustomRecords,
|
||||
)
|
||||
if err != nil {
|
||||
return payIntent, err
|
||||
}
|
||||
|
||||
validateDest := func(dest route.Vertex) error {
|
||||
|
||||
+2
-2
@@ -219,7 +219,7 @@ func StubEncoder(v []byte) Encoder {
|
||||
// MapToRecords encodes the passed TLV map as a series of regular tlv.Record
|
||||
// instances. The resulting set of records will be returned in sorted order by
|
||||
// their type.
|
||||
func MapToRecords(tlvMap map[uint64][]byte) ([]Record, error) {
|
||||
func MapToRecords(tlvMap map[uint64][]byte) []Record {
|
||||
records := make([]Record, 0, len(tlvMap))
|
||||
for k, v := range tlvMap {
|
||||
// We don't pass in a decoder here since we don't actually know
|
||||
@@ -234,7 +234,7 @@ func MapToRecords(tlvMap map[uint64][]byte) ([]Record, error) {
|
||||
|
||||
SortRecords(records)
|
||||
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// SortRecords is a helper function that will sort a slice of records in place
|
||||
|
||||
+1
-4
@@ -114,10 +114,7 @@ func TestRecordMapTransformation(t *testing.T) {
|
||||
spew.Sdump(mappedRecords))
|
||||
}
|
||||
|
||||
unmappedRecords, err := MapToRecords(mappedRecords)
|
||||
if err != nil {
|
||||
t.Fatalf("#%v: unable to unmap records: %v", i, err)
|
||||
}
|
||||
unmappedRecords := MapToRecords(mappedRecords)
|
||||
|
||||
for i := 0; i < len(testCase.records); i++ {
|
||||
if unmappedRecords[i].Type() != testCase.records[i].Type() {
|
||||
|
||||
Reference in new issue
Block a user