You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec now allows the ranges [1000000000, 1999999999] and [2000000000, 2999999999] for offer and invoice request TLVs in addition to the previous [1, 79] and [80, 159].
// Invoice request TLVs are in the range [0, 160): invoice request metadata (tag 0), offer TLVs, and additional invoice request TLVs in the range [80, 160).
@@ -522,4 +523,21 @@ class OfferTypesTestsCommon : LightningTestSuite() {
522
523
val expectedOffer =Offer.decode("lno1zrxq8pjw7qjlm68mtp7e3yvxee4y5xrgjhhyf2fxhlphpckrvevh50u0qf70a6j2x2akrhazctejaaqr8y4qtzjtjzmfesay6mzr3s789uryuqsr8dpgfgxuk56vh7cl89769zdpdrkqwtypzhu2t8ehp73dqeeq65lsqvlx5pj8mw2kz54p4f6ct66stdfxz0df8nqq7svjjdjn2dv8sz28y7z07yg3vqyfyy8ywevqc8kzp36lhd5cqwlpkg8vdcqsfvz89axkmv5sgdysmwn95tpsct6mdercmz8jh2r82qqscrf6uc3tse5gw5sv5xjdfw8f6c").get()
523
524
assertEquals(expectedOffer, offer)
524
525
}
526
+
527
+
@Test
528
+
fun`experimental TLVs range`() {
529
+
val trampolineNode =PublicKey.fromHex("03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f")
530
+
val nodeParams =TestConstants.Alice.nodeParams.copy(chain =Chain.Mainnet)
531
+
val (defaultOffer, key) = nodeParams.defaultOffer(trampolineNode)
532
+
val offerWithUnknownTlvs =Offer.validate(TlvStream(defaultOffer.records.records, setOf(GenericTlv(53, ByteVector.fromHex("b46af6")), GenericTlv(1000759647, ByteVector.fromHex("41dec6"))))).right!!
0 commit comments