lnwire: add LeaseExpiry custom record for Open+AcceptChannel
This commit is contained in:
1 parent
6052a446dc
commit
6252563bc5
5 files changed
+119
-6
No files matched your search
@@ -360,7 +360,7 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
// 1/2 chance empty upfront shutdown script.
|
||||
// 1/2 chance empty TLV records.
|
||||
if r.Intn(2) == 0 {
|
||||
req.UpfrontShutdownScript, err = randDeliveryAddress(r)
|
||||
if err != nil {
|
||||
@@ -370,6 +370,9 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
|
||||
req.ChannelType = new(ChannelType)
|
||||
*req.ChannelType = ChannelType(*randRawFeatureVector(r))
|
||||
|
||||
req.LeaseExpiry = new(LeaseExpiry)
|
||||
*req.LeaseExpiry = LeaseExpiry(1337)
|
||||
} else {
|
||||
req.UpfrontShutdownScript = []byte{}
|
||||
}
|
||||
@@ -429,7 +432,7 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
// 1/2 chance empty upfront shutdown script.
|
||||
// 1/2 chance empty TLV records.
|
||||
if r.Intn(2) == 0 {
|
||||
req.UpfrontShutdownScript, err = randDeliveryAddress(r)
|
||||
if err != nil {
|
||||
@@ -439,6 +442,9 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
|
||||
req.ChannelType = new(ChannelType)
|
||||
*req.ChannelType = ChannelType(*randRawFeatureVector(r))
|
||||
|
||||
req.LeaseExpiry = new(LeaseExpiry)
|
||||
*req.LeaseExpiry = LeaseExpiry(1337)
|
||||
} else {
|
||||
req.UpfrontShutdownScript = []byte{}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user