hsm: Make sure to pass close_info along with the UTXO

The close_info is needed to re-derive the secret key that is supposed
to be used to sign the input spending the output.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-01-02 14:54:32 +01:00
parent 37c2873c88
commit 59128a86ee
3 changed files with 22 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ type2size = {
varlen_structs = [
'gossip_getnodes_entry',
'failed_htlc',
'utxo',
]
class FieldType(object):
@@ -297,7 +298,7 @@ class Message(object):
self.print_fromwire_array(subcalls, basetype, f, f.name,
f.num_elems)
elif f.is_variable_size():
subcalls.append("\t//2th case {name}".format(name=f.name))
subcalls.append("\t//2nd case {name}".format(name=f.name))
subcalls.append('\t*{} = {} ? tal_arr(ctx, {}, {}) : NULL;'
.format(f.name, f.lenvar, f.fieldtype.name, f.lenvar))