diff --git a/tests/events/bolt1-02-unknown-messages.events b/tests/events/bolt1-02-unknown-messages.events new file mode 100644 index 000000000..ab5949416 --- /dev/null +++ b/tests/events/bolt1-02-unknown-messages.events @@ -0,0 +1,22 @@ +# Init exchange, with unknown messages +# +# BOLT #1: +# The receiving node: +#... +# - upon receiving unknown _odd_ feature bits that are non-zero: +# - MUST ignore the bit. +# - upon receiving unknown _even_ feature bits that are non-zero: +# - MUST fail the connection. + +1. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 +2. expect-send: type=init conn=0000000000000000000000000000000000000000000000000000000000000003 +3. recv: type=init globalfeatures= localfeatures= + + 1. nothing + + # Unknown odd is OK. + 1. recv: type=9999 + + # Unknown even causes error. + 1. recv: type=10000 + 2. expect-error: diff --git a/tests/events/bolt2-01-open_channel.events b/tests/events/bolt2-01-open_channel.events index 7083f26c8..e3a6f7311 100644 --- a/tests/events/bolt2-01-open_channel.events +++ b/tests/events/bolt2-01-open_channel.events @@ -33,6 +33,10 @@ first_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 channel_flags=01 + # Ignore unknown odd messages + 1. nothing + 1. recv: type=9999 + 2. expect-send: type=accept_channel temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # funding_privkey=0000000000000000000000000000000000000000000000000000000000000010 @@ -53,6 +57,10 @@ to_self_delay=6 channel_reserve_satoshis=9998 + # Ignore unknown messages + 1. nothing + 1. recv: type=9999 + 3. recv: type=funding_created temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # Funding tx is 020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 @@ -76,3 +84,8 @@ 7. recv: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d + + # Ignore unknown odd messages + 1. nothing + 1. recv: type=9999 + diff --git a/tests/events/bolt2-02-add-htlc.events b/tests/events/bolt2-02-add-htlc.events index 0e40fc42b..0a16dd899 100644 --- a/tests/events/bolt2-02-add-htlc.events +++ b/tests/events/bolt2-02-add-htlc.events @@ -92,6 +92,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 3. expect-send: type=init @@ -136,6 +139,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 3. expect-send: type=init @@ -185,6 +191,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # If tester did not receive node's revoke_and_ack: 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -265,6 +274,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester must have received node's commitment_signed 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -298,6 +310,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 3. expect-send: type=init @@ -347,6 +362,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # If tester did not receive node's revoke_and_ack: 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -427,6 +445,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester must have received node's commitment_signed 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 diff --git a/tests/events/bolt2-03-htlc-fail.events b/tests/events/bolt2-03-htlc-fail.events index 882502855..973d1a357 100644 --- a/tests/events/bolt2-03-htlc-fail.events +++ b/tests/events/bolt2-03-htlc-fail.events @@ -208,6 +208,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester must have received node's commitment_signed 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -239,6 +242,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester has not received last commitment_signed 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -294,6 +300,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester must have received last commitment_signed 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -327,6 +336,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester *has not* received revoke_and_ack 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 diff --git a/tests/events/bolt2-04-htlc-fulfill.events b/tests/events/bolt2-04-htlc-fulfill.events index 1ab615043..c092e9e00 100644 --- a/tests/events/bolt2-04-htlc-fulfill.events +++ b/tests/events/bolt2-04-htlc-fulfill.events @@ -132,6 +132,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 3. expect-send: type=init @@ -218,6 +221,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + # tester must have received node's commitment_signed 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 @@ -264,6 +270,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 3. expect-send: type=init @@ -336,6 +345,9 @@ MAYBE_UPDATE=maybe-send: type=channel_update # Optional reconnection testing. 1. nothing + # Ignore unknown odd messages + 1. recv: type=9999 + 1. disconnect: 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 3. expect-send: type=init