lnwire: make LocalNonce an optional tlv record and fix extra data
It should be an optional record instead of an fn option. In addition, its tlv type is bumped to be 14 as this record is also included in the `DynCommit`. If we use tlv type 0, it will create a conflict in the msg `DynCommit`, which is fixed in the following commit.
This commit is contained in:
2 files changed
+26
-46
No files matched your search
@@ -796,9 +796,10 @@ func (da *DynAck) RandTestMessage(t *rapid.T) Message {
|
||||
}
|
||||
|
||||
includeLocalNonce := rapid.Bool().Draw(t, "includeLocalNonce")
|
||||
|
||||
if includeLocalNonce {
|
||||
msg.LocalNonce = fn.Some(RandMusig2Nonce(t))
|
||||
nonce := RandMusig2Nonce(t)
|
||||
rec := tlv.NewRecordT[tlv.TlvType14](nonce)
|
||||
msg.LocalNonce = tlv.SomeRecordT(rec)
|
||||
}
|
||||
|
||||
// Create a tlv type lists to hold all known records which will be
|
||||
|
||||
Reference in new issue
Block a user