Skip to content

Commit

Permalink
option-data-loss-protect: fix generate-wire.py and update.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Nov 16, 2017
1 parent f524df7 commit 44e4534
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CCANDIR := ccan

# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
BOLTVERSION := c93cd75d880c82fb2ff7173a99d9f49abf75f8bf
BOLTVERSION := 046f5acb1619bccf167e5539f144433495f1486b

# If you don't have (working) valgrind.
#NO_VALGRIND := 1
Expand Down
4 changes: 2 additions & 2 deletions tools/generate-wire.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ def find_message(messages, name):
return None

def find_message_with_option(messages, optional_messages, name, option):
fullname = name + "_" + option;
fullname = name + "_" + option.replace('-', '_')

base = find_message(messages, name)
if not base:
raise ValueError('Unknown message {}'.format(name))

m = find_message(optional_messages, name)
m = find_message(optional_messages, fullname)
if not m:
# Add a new option.
m = copy.deepcopy(base)
Expand Down
2 changes: 2 additions & 0 deletions wire/gen_peer_wire_csv
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ channel_reestablish,136
channel_reestablish,0,channel_id,32
channel_reestablish,32,next_local_commitment_number,8
channel_reestablish,40,next_remote_revocation_number,8
channel_reestablish,48,your_last_per_commitment_secret,32,option-data-loss-protect
channel_reestablish,80,my_current_per_commitment_point,33,option-data-loss-protect
announcement_signatures,259
announcement_signatures,0,channel_id,32
announcement_signatures,32,short_channel_id,8
Expand Down

0 comments on commit 44e4534

Please sign in to comment.