Skip to content

Commit

Permalink
msggen: fix invoice request missing exposeprivatechannels
Browse files Browse the repository at this point in the history
Changelog-None
  • Loading branch information
daywalker90 committed Apr 24, 2024
1 parent 7317bb1 commit 608ad07
Show file tree
Hide file tree
Showing 8 changed files with 442 additions and 516 deletions.
87 changes: 3 additions & 84 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -978,9 +978,7 @@
},
"Fundchannel_startChannel_type": {
"FundChannel_Start.channel_type.bits[]": 1,
"FundChannel_Start.channel_type.names[]": 2,
"Fundchannel_Start.channel_type.bits[]": 1,
"Fundchannel_Start.channel_type.names[]": 2
"FundChannel_Start.channel_type.names[]": 2
},
"Fundchannel_startRequest": {
"FundChannel_Start.amount": 2,
Expand All @@ -991,30 +989,15 @@
"FundChannel_Start.id": 1,
"FundChannel_Start.mindepth": 7,
"FundChannel_Start.push_msat": 6,
"FundChannel_Start.reserve": 8,
"Fundchannel_Start.amount": 9,
"Fundchannel_Start.announce": 3,
"Fundchannel_Start.channel_type[]": 8,
"Fundchannel_Start.close_to": 4,
"Fundchannel_Start.feerate": 2,
"Fundchannel_Start.id": 1,
"Fundchannel_Start.mindepth": 6,
"Fundchannel_Start.push_msat": 5,
"Fundchannel_Start.reserve": 7
"FundChannel_Start.reserve": 8
},
"Fundchannel_startResponse": {
"FundChannel_Start.channel_type": 3,
"FundChannel_Start.close_to": 4,
"FundChannel_Start.funding_address": 1,
"FundChannel_Start.mindepth": 6,
"FundChannel_Start.scriptpubkey": 2,
"FundChannel_Start.warning_usage": 5,
"Fundchannel_Start.channel_type": 3,
"Fundchannel_Start.close_to": 4,
"Fundchannel_Start.funding_address": 1,
"Fundchannel_Start.mindepth": 6,
"Fundchannel_Start.scriptpubkey": 2,
"Fundchannel_Start.warning_usage": 5
"FundChannel_Start.warning_usage": 5
},
"FundpsbtRequest": {
"FundPsbt.excess_as_change": 8,
Expand Down Expand Up @@ -4196,70 +4179,6 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start": {
"added": "pre-v0.10.1",
"deprecated": null
},
"Fundchannel_Start.amount": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.announce": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.channel_type": {
"added": "v24.02",
"deprecated": false
},
"Fundchannel_Start.channel_type.bits[]": {
"added": "v24.02",
"deprecated": false
},
"Fundchannel_Start.channel_type.names[]": {
"added": "v24.02",
"deprecated": false
},
"Fundchannel_Start.channel_type[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.close_to": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.feerate": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.funding_address": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.mindepth": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.push_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.reserve": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.scriptpubkey": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Fundchannel_Start.warning_usage": {
"added": "pre-v0.10.1",
"deprecated": false
},
"GetRoute": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down
1 change: 1 addition & 0 deletions cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions contrib/msggen/msggen/gen/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def generate_composite(self, prefix, field: CompositeField):
'hex': f'hex::decode(i).unwrap()',
'secret': f'i.to_vec()',
'hash': f'<Sha256 as AsRef<[u8]>>::as_ref(&i).to_vec()',
'short_channel_id': f'i.to_string()',
}.get(typ, f'i.into()')

self.write(f"// Field: {f.path}\n", numindent=3)
Expand Down Expand Up @@ -461,6 +462,7 @@ def generate_composite(self, prefix, field: CompositeField) -> None:
'u32': f's',
'secret': f's.try_into().unwrap()',
'hash': f'Sha256::from_slice(&s).unwrap()',
'short_channel_id': f'cln_rpc::primitives::ShortChannelId::from_str(&s).unwrap()',
}.get(typ, f's.into()')

# TODO fix properly
Expand Down
2 changes: 1 addition & 1 deletion contrib/msggen/msggen/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def __str__(self):
InvoiceLabelField = PrimitiveField("string", None, None, added=None, deprecated=None)
DatastoreKeyField = ArrayField(itemtype=PrimitiveField("string", None, None, added=None, deprecated=None), dims=1, path=None, description=None, added=None, deprecated=None)
DatastoreUsageKeyField = ArrayField(itemtype=PrimitiveField("string", None, None, added="v23.11", deprecated=None), dims=1, path=None, description=None, added="v23.11", deprecated=None)
InvoiceExposeprivatechannelsField = PrimitiveField("boolean", None, None, added=None, deprecated=None)
InvoiceExposeprivatechannelsField = ArrayField(itemtype=PrimitiveField("short_channel_id", None, None, added=None, deprecated=None), dims=1, path=None, description=None, added=None, deprecated=None)
PayExclude = ArrayField(itemtype=PrimitiveField("string", None, None, added=None, deprecated=None), dims=1, path=None, description=None, added=None, deprecated=None)
RoutehintListField = PrimitiveField(
"RoutehintList",
Expand Down
1 change: 0 additions & 1 deletion contrib/msggen/msggen/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class OverridePatch(Patch):
'Decode.unknown_offer_tlvs[]',
'DecodePay.routes[][]',
'DecodeRoutes.routes',
'Invoice.exposeprivatechannels',
'ListClosedChannels.closedchannels[].channel_type',
'ListPeerChannels.channels[].channel_type',
'ListPeerChannels.channels[].features[]',
Expand Down
860 changes: 430 additions & 430 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Large diffs are not rendered by default.

0 comments on commit 608ad07

Please sign in to comment.