mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 14:54:22 +01:00
relative cltv expiry can be negative
This commit is contained in:
@@ -107,7 +107,7 @@ type Htlc struct {
|
|||||||
Id uint64 `json:"id"`
|
Id uint64 `json:"id"`
|
||||||
AmountMsat uint64 `json:"amount_msat"`
|
AmountMsat uint64 `json:"amount_msat"`
|
||||||
CltvExpiry uint32 `json:"cltv_expiry"`
|
CltvExpiry uint32 `json:"cltv_expiry"`
|
||||||
CltvExpiryRelative uint32 `json:"cltv_expiry_relative"`
|
CltvExpiryRelative int32 `json:"cltv_expiry_relative"`
|
||||||
PaymentHash string `json:"payment_hash"`
|
PaymentHash string `json:"payment_hash"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ type Htlc struct {
|
|||||||
Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
|
Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
AmountMsat uint64 `protobuf:"varint,3,opt,name=amount_msat,json=amountMsat,proto3" json:"amount_msat,omitempty"`
|
AmountMsat uint64 `protobuf:"varint,3,opt,name=amount_msat,json=amountMsat,proto3" json:"amount_msat,omitempty"`
|
||||||
CltvExpiry uint32 `protobuf:"varint,4,opt,name=cltv_expiry,json=cltvExpiry,proto3" json:"cltv_expiry,omitempty"`
|
CltvExpiry uint32 `protobuf:"varint,4,opt,name=cltv_expiry,json=cltvExpiry,proto3" json:"cltv_expiry,omitempty"`
|
||||||
CltvExpiryRelative uint32 `protobuf:"varint,5,opt,name=cltv_expiry_relative,json=cltvExpiryRelative,proto3" json:"cltv_expiry_relative,omitempty"`
|
CltvExpiryRelative int32 `protobuf:"varint,5,opt,name=cltv_expiry_relative,json=cltvExpiryRelative,proto3" json:"cltv_expiry_relative,omitempty"`
|
||||||
PaymentHash string `protobuf:"bytes,6,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
PaymentHash string `protobuf:"bytes,6,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ func (x *Htlc) GetCltvExpiry() uint32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Htlc) GetCltvExpiryRelative() uint32 {
|
func (x *Htlc) GetCltvExpiryRelative() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.CltvExpiryRelative
|
return x.CltvExpiryRelative
|
||||||
}
|
}
|
||||||
@@ -272,6 +272,7 @@ type HtlcResolution struct {
|
|||||||
|
|
||||||
Correlationid string `protobuf:"bytes,1,opt,name=correlationid,proto3" json:"correlationid,omitempty"`
|
Correlationid string `protobuf:"bytes,1,opt,name=correlationid,proto3" json:"correlationid,omitempty"`
|
||||||
// Types that are assignable to Outcome:
|
// Types that are assignable to Outcome:
|
||||||
|
//
|
||||||
// *HtlcResolution_Fail
|
// *HtlcResolution_Fail
|
||||||
// *HtlcResolution_Continue
|
// *HtlcResolution_Continue
|
||||||
// *HtlcResolution_Resolve
|
// *HtlcResolution_Resolve
|
||||||
@@ -428,6 +429,7 @@ type HtlcFail struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Types that are assignable to Failure:
|
// Types that are assignable to Failure:
|
||||||
|
//
|
||||||
// *HtlcFail_FailureMessage
|
// *HtlcFail_FailureMessage
|
||||||
// *HtlcFail_FailureOnion
|
// *HtlcFail_FailureOnion
|
||||||
Failure isHtlcFail_Failure `protobuf_oneof:"failure"`
|
Failure isHtlcFail_Failure `protobuf_oneof:"failure"`
|
||||||
@@ -679,7 +681,7 @@ var file_cln_plugin_proto_rawDesc = []byte{
|
|||||||
0x74, 0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
0x74, 0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||||
0x0a, 0x63, 0x6c, 0x74, 0x76, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x63,
|
0x0a, 0x63, 0x6c, 0x74, 0x76, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x63,
|
||||||
0x6c, 0x74, 0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74,
|
0x6c, 0x74, 0x76, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74,
|
||||||
0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x63, 0x6c, 0x74, 0x76, 0x45,
|
0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x6c, 0x74, 0x76, 0x45,
|
||||||
0x78, 0x70, 0x69, 0x72, 0x79, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x21, 0x0a,
|
0x78, 0x70, 0x69, 0x72, 0x79, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x21, 0x0a,
|
||||||
0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20,
|
0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68,
|
0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ message Htlc {
|
|||||||
uint64 id = 2;
|
uint64 id = 2;
|
||||||
uint64 amount_msat = 3;
|
uint64 amount_msat = 3;
|
||||||
uint32 cltv_expiry = 4;
|
uint32 cltv_expiry = 4;
|
||||||
uint32 cltv_expiry_relative = 5;
|
int32 cltv_expiry_relative = 5;
|
||||||
string payment_hash = 6;
|
string payment_hash = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user