option-data-loss-protect: fix generate-wire.py and update.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-11-15 14:32:21 +10:30 committed by Christian Decker
parent f524df721d
commit 44e45348f2
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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