Skip to content

Commit

Permalink
Add Stfu type to decode logic (#595)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Myers <[email protected]>
  • Loading branch information
pm47 and remyers authored Feb 8, 2024
1 parent 307c4bd commit 77003f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ interface LightningMessage {
UnsetFCMToken.type -> UnsetFCMToken
PhoenixAndroidLegacyInfo.type -> PhoenixAndroidLegacyInfo.read(stream)
PleaseOpenChannel.type -> PleaseOpenChannel.read(stream)
Stfu.type -> Stfu.read(stream)
SpliceInit.type -> SpliceInit.read(stream)
SpliceAck.type -> SpliceAck.read(stream)
SpliceLocked.type -> SpliceLocked.read(stream)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ class LightningCodecsTestsCommon : LightningTestSuite() {
val fundingPubkey = PublicKey(ByteVector.fromHex("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"))
val testCases = listOf(
// @formatter:off
Stfu(channelId, false) to ByteVector("0002 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00"),
Stfu(channelId, true) to ByteVector("0002 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 01"),
SpliceInit(channelId, 100_000.sat, FeeratePerKw(2500.sat), 100, fundingPubkey) to ByteVector("9088 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00000000000186a0 000009c4 00000064 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),
SpliceInit(channelId, 150_000.sat, 25_000_000.msat, FeeratePerKw(2500.sat), 100, fundingPubkey, null) to ByteVector("9088 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00000000000249f0 000009c4 00000064 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 fe4700000704017d7840"),
SpliceInit(channelId, 0.sat, FeeratePerKw(500.sat), 0, fundingPubkey) to ByteVector("9088 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0000000000000000 000001f4 00000000 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),
Expand Down

0 comments on commit 77003f9

Please sign in to comment.