mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
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:
@@ -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