Skip to content

Commit

Permalink
tests/events: add tests for option_static_remotekey.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Sep 2, 2019
1 parent 5d442b0 commit 2d52316
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 71 deletions.
17 changes: 17 additions & 0 deletions tests/events/bolt1-01-init.events
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@
# If you require `option_data_loss_protect`, you will advertize it even.
1. expect-send: type=init localfeatures=01/03 option_data_loss_protect/even

# If you don't support `option_static_remotekey`, you will be ok if
# we ask for it.
1. expect-send: type=init localfeatures=0000000000/C000000000 !option_static_remotekey
2. recv: type=init globalfeatures= localfeatures=02000000000000 !option_static_remotekey

# If you don't support `option_static_remotekey`, you will error if
# we require it.
1. expect-send: type=init localfeatures=0000000000/C000000000 !option_static_remotekey
2. recv: type=init globalfeatures= localfeatures=01000000000000 !option_static_remotekey
3. expect-error: !option_static_remotekey

# If you support `option_static_remotekey`, you will advertize it odd.
1. expect-send: type=init localfeatures=02000000000000/03000000000000 option_static_remotekey/odd

# If you require `option_static_remotekey`, you will advertize it even.
1. expect-send: type=init localfeatures=01000000000000/03000000000000 option_static_remotekey/even

# Note: it's undefined what you'll do if implementation requires
# an option and isn't offered it. The recipient of the required feature
# bit should notice the requirement and error.
Loading

0 comments on commit 2d52316

Please sign in to comment.