mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
lnwire: add missing record LocalNonce
This record was never added to the `DynCommit`, but it's inherited from the embedding msg `DynAck`.
This commit is contained in:
@@ -1004,11 +1004,21 @@ func (dc *DynCommit) RandTestMessage(t *rapid.T) Message {
|
||||
dp.ChannelType = tlv.SomeRecordT(chanType)
|
||||
}
|
||||
|
||||
includeLocalNonce := rapid.Bool().Draw(t, "includeLocalNonce")
|
||||
if includeLocalNonce {
|
||||
nonce := RandMusig2Nonce(t)
|
||||
rec := tlv.NewRecordT[tlv.TlvType14](nonce)
|
||||
da.LocalNonce = tlv.SomeRecordT(rec)
|
||||
}
|
||||
|
||||
// Create a tlv type lists to hold all known records which will be
|
||||
// ignored when creating ExtraData records.
|
||||
ignoreRecords := fn.NewSet[uint64]()
|
||||
for i := range uint64(13) {
|
||||
ignoreRecords.Add(i)
|
||||
for i := range uint64(15) {
|
||||
// Ignore known records.
|
||||
if i%2 == 0 {
|
||||
ignoreRecords.Add(i)
|
||||
}
|
||||
}
|
||||
msg := &DynCommit{
|
||||
DynPropose: *dp,
|
||||
|
Reference in New Issue
Block a user