Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema: add missing option_will_fund for listnodes #7210

Closed
Closed
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
39 changes: 38 additions & 1 deletion .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -1119,13 +1119,22 @@
"ListNodes.nodes[].color": 4,
"ListNodes.nodes[].features": 5,
"ListNodes.nodes[].last_timestamp": 2,
"ListNodes.nodes[].nodeid": 1
"ListNodes.nodes[].nodeid": 1,
"ListNodes.nodes[].option_will_fund": 7
},
"ListnodesNodesAddresses": {
"ListNodes.nodes[].addresses[].address": 3,
"ListNodes.nodes[].addresses[].port": 2,
"ListNodes.nodes[].addresses[].type": 1
},
"ListnodesNodesOption_will_fund": {
"ListNodes.nodes[].option_will_fund.channel_fee_max_base_msat": 4,
"ListNodes.nodes[].option_will_fund.channel_fee_max_proportional_thousandths": 5,
"ListNodes.nodes[].option_will_fund.compact_lease": 6,
"ListNodes.nodes[].option_will_fund.funding_weight": 3,
"ListNodes.nodes[].option_will_fund.lease_fee_base_msat": 1,
"ListNodes.nodes[].option_will_fund.lease_fee_basis": 2
},
"ListnodesRequest": {
"ListNodes.id": 1
},
Expand Down Expand Up @@ -4283,6 +4292,34 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund.channel_fee_max_base_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund.channel_fee_max_proportional_thousandths": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund.compact_lease": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund.funding_weight": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund.lease_fee_base_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListNodes.nodes[].option_will_fund.lease_fee_basis": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListOffers": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down
12 changes: 11 additions & 1 deletion cln-grpc/proto/node.proto

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

17 changes: 16 additions & 1 deletion cln-grpc/src/convert.rs

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

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

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

170 changes: 60 additions & 110 deletions contrib/msggen/msggen/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18532,6 +18532,56 @@
"description": [
"A node_announcement has been received for this node (UNIX timestamp)."
]
},
"option_will_fund": {
"type": "object",
"additionalProperties": false,
"required": [
"lease_fee_base_msat",
"lease_fee_basis",
"funding_weight",
"channel_fee_max_base_msat",
"channel_fee_max_proportional_thousandths",
"compact_lease"
],
"properties": {
"lease_fee_base_msat": {
"type": "msat",
"description": [
"The fixed fee for a lease (whole number of satoshis)."
]
},
"lease_fee_basis": {
"type": "u32",
"description": [
"The proportional fee in basis points (parts per 10,000) for a lease."
]
},
"funding_weight": {
"type": "u32",
"description": [
"The onchain weight you'll have to pay for a lease."
]
},
"channel_fee_max_base_msat": {
"type": "msat",
"description": [
"The maximum base routing fee this node will charge during the lease."
]
},
"channel_fee_max_proportional_thousandths": {
"type": "u32",
"description": [
"The maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)."
]
},
"compact_lease": {
"type": "hex",
"description": [
"The lease as represented in the node_announcement."
]
}
}
}
},
"allOf": [
Expand Down Expand Up @@ -18585,7 +18635,8 @@
"type": "object",
"required": [
"type",
"port"
"port",
"address"
],
"additionalProperties": true,
"properties": {
Expand All @@ -18607,49 +18658,12 @@
"description": [
"Port number."
]
}
},
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"dns",
"ipv4",
"ipv6",
"torv2",
"torv3"
]
}
}
},
"then": {
"required": [
"type",
"address",
"port"
],
"additionalProperties": false,
"properties": {
"type": {},
"port": {},
"address": {
"type": "string",
"description": [
"Address in expected format for **type**."
]
}
}
},
"else": {
"required": [
"type",
"port"
],
"additionalProperties": false,
"properties": {
"type": {},
"port": {}
},
"address": {
"type": "string",
"description": [
"Address in expected format for **type**."
]
}
}
}
Expand All @@ -18659,72 +18673,8 @@
"else": {
"additionalProperties": false,
"properties": {
"nodeid": {}
}
}
},
{
"if": {
"required": [
"option_will_fund"
]
},
"then": {
"additionalProperties": true,
"required": [
"option_will_fund"
],
"properties": {
"option_will_fund": {
"type": "object",
"additionalProperties": false,
"required": [
"lease_fee_base_msat",
"lease_fee_basis",
"funding_weight",
"channel_fee_max_base_msat",
"channel_fee_max_proportional_thousandths",
"compact_lease"
],
"properties": {
"lease_fee_base_msat": {
"type": "msat",
"description": [
"The fixed fee for a lease (whole number of satoshis)."
]
},
"lease_fee_basis": {
"type": "u32",
"description": [
"The proportional fee in basis points (parts per 10,000) for a lease."
]
},
"funding_weight": {
"type": "u32",
"description": [
"The onchain weight you'll have to pay for a lease."
]
},
"channel_fee_max_base_msat": {
"type": "msat",
"description": [
"The maximum base routing fee this node will charge during the lease."
]
},
"channel_fee_max_proportional_thousandths": {
"type": "u32",
"description": [
"The maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)."
]
},
"compact_lease": {
"type": "hex",
"description": [
"The lease as represented in the node_announcement."
]
}
}
}
"nodeid": {},
"option_will_fund": {}
}
}
}
Expand Down
578 changes: 290 additions & 288 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions contrib/pyln-testing/pyln/testing/grpc2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,17 @@ def pay2py(m):
})


def listnodes_nodes_option_will_fund2py(m):
return remove_default({
"lease_fee_base_msat": amount2msat(m.lease_fee_base_msat), # PrimitiveField in generate_composite
"lease_fee_basis": m.lease_fee_basis, # PrimitiveField in generate_composite
"funding_weight": m.funding_weight, # PrimitiveField in generate_composite
"channel_fee_max_base_msat": amount2msat(m.channel_fee_max_base_msat), # PrimitiveField in generate_composite
"channel_fee_max_proportional_thousandths": m.channel_fee_max_proportional_thousandths, # PrimitiveField in generate_composite
"compact_lease": hexlify(m.compact_lease), # PrimitiveField in generate_composite
})


def listnodes_nodes_addresses2py(m):
return remove_default({
"type": str(m.item_type), # EnumField in generate_composite
Expand Down
Loading
Loading