Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/initial_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ struct channel_type **channel_upgradable_types(const tal_t *ctx,
struct channel_type *channel_desired_type(const tal_t *ctx,
const struct channel *channel)
{
/* We don't actually want to downgrade anchors! */
if (channel->option_anchor_outputs)
return type_anchor_outputs(ctx);

/* For now, we just want option_static_remotekey */
return type_static_remotekey(ctx);
}
Expand Down
14 changes: 9 additions & 5 deletions contrib/pyln-proto/pyln/proto/message/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def write(self, io_out: BufferedIOBase, v: Dict[str, Any], otherfields: Dict[str
raise ValueError("Missing field {} {}".format(f.name, otherfields))
val = None

if self.name in otherfields:
otherfields = otherfields[self.name]
if type(f.fieldtype) is SubtypeType:
otherfields = otherfields[f.name]
f.fieldtype.write(io_out, val, otherfields)

def read(self, io_in: BufferedIOBase, otherfields: Dict[str, Any]) -> Optional[Dict[str, Any]]:
Expand Down Expand Up @@ -521,8 +521,12 @@ def val_to_py(self, val: Dict[str, Any], otherfields: Dict[str, Any]) -> Dict[st
ret: Dict[str, Any] = {}
for k, v in val.items():
field = self.find_field(k)
assert field
ret[k] = field.val_to_py(v, val)
if field:
ret[k] = field.val_to_py(v, val)
else:
# Unknown TLV, index by number.
assert isinstance(k, int)
ret[k] = v.hex()
return ret

def write(self, io_out: BufferedIOBase, v: Optional[Dict[str, Any]], otherfields: Dict[str, Any]) -> None:
Expand Down Expand Up @@ -554,7 +558,7 @@ def get_value(tup):

for typenum, writefunc, val in ordered:
buf = BytesIO()
writefunc(cast(BufferedIOBase, buf), val, otherfields)
writefunc(cast(BufferedIOBase, buf), val, val)
BigSizeType.write(io_out, typenum)
BigSizeType.write(io_out, len(buf.getvalue()))
io_out.write(buf.getvalue())
Expand Down
1 change: 0 additions & 1 deletion contrib/pyln-spec/bolt1/boltsetup.py

This file was deleted.

1 change: 0 additions & 1 deletion contrib/pyln-spec/bolt2/boltsetup.py

This file was deleted.

1 change: 0 additions & 1 deletion contrib/pyln-spec/bolt4/boltsetup.py

This file was deleted.

1 change: 0 additions & 1 deletion contrib/pyln-spec/bolt7/boltsetup.py

This file was deleted.