Commit Graph

14 Commits

Author SHA1 Message Date
yyforyongyu
91797ad1d2 lnwire: patch test and fix extra data in DynCommit 2025-07-11 04:11:31 +03:00
yyforyongyu
e6ab37305c lnwire: add missing record LocalNonce
This record was never added to the `DynCommit`, but it's inherited from
the embedding msg `DynAck`.
2025-07-11 04:11:30 +03:00
yyforyongyu
f39c3679f2 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.
2025-07-11 04:11:30 +03:00
yyforyongyu
b7d2f68ed0 lnwire: patch uint test for DynAck 2025-07-11 04:11:30 +03:00
yyforyongyu
5961f7a1bd lnwire: add method ParseAndExtractExtraData
Similar to `ParseAndExtractCustomRecords`, we now add this helper method
to make sure the extra data is parsed correctly.
2025-07-11 04:11:30 +03:00
yyforyongyu
5e9365552c lnwire: fix encoding ExtraData in DynPropose
Previously we encode all the fields plus extra data to the field
`ExtraData`, this is now fixed by encoding only unknown data to extra
data. For known records, they are already encoded into the message
fields.
2025-07-11 04:11:29 +03:00
yyforyongyu
0f1cb54eb2 lnwire: use BigSize for encoding btc amount 2025-07-11 04:09:11 +03:00
yyforyongyu
828486e35a lnwire: fix unit test for DynCommit 2025-06-25 14:53:20 +08:00
Keagan McClelland
a72cadf2ed lnwire: convert DynPropose and DynCommit to use typed tlv records 2025-06-25 02:22:22 +08:00
Keagan McClelland
f40530e4f4 lnwire: remove FundingKey from DynPropose and DynCommit 2025-06-25 02:08:56 +08:00
Keagan McClelland
cbca5b1152 lnwire: remove kickoff feerate from propose/commit 2025-06-25 02:08:22 +08:00
Keagan McClelland
c6861770de lnwire: remove no longer used initiator field 2025-06-25 01:10:46 +08:00
Elle Mouton
420001a98c lnwire: add InboundFee TLV record to ChannelUpdate 2025-06-09 08:32:52 +02:00
Olaoluwa Osuntokun
eb877db2ff lnwire: add new TestMessage interface for property tests
In this commit, we add a new `TestMessage` interface for use in property
tests. With this, we'll be able to generate a random instance of a given
message, using the rapid byte stream. This can also eventually be useful
for fuzzing.
2025-03-20 18:28:07 -07:00