mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
lightningd: expose ignore_fee_limits field in listpeerchannels.
Changelog-Added: JSON-RPC: `listpeerchannels` has a new field `ignore_fee_limits` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1002,6 +1002,7 @@
|
|||||||
"ListPeerChannels.channels[].funding_outnum": 11,
|
"ListPeerChannels.channels[].funding_outnum": 11,
|
||||||
"ListPeerChannels.channels[].funding_txid": 10,
|
"ListPeerChannels.channels[].funding_txid": 10,
|
||||||
"ListPeerChannels.channels[].htlcs[]": 52,
|
"ListPeerChannels.channels[].htlcs[]": 52,
|
||||||
|
"ListPeerChannels.channels[].ignore_fee_limits": 54,
|
||||||
"ListPeerChannels.channels[].in_fulfilled_msat": 47,
|
"ListPeerChannels.channels[].in_fulfilled_msat": 47,
|
||||||
"ListPeerChannels.channels[].in_offered_msat": 45,
|
"ListPeerChannels.channels[].in_offered_msat": 45,
|
||||||
"ListPeerChannels.channels[].in_payments_fulfilled": 46,
|
"ListPeerChannels.channels[].in_payments_fulfilled": 46,
|
||||||
@@ -3881,6 +3882,10 @@
|
|||||||
"added": "v23.02",
|
"added": "v23.02",
|
||||||
"deprecated": false
|
"deprecated": false
|
||||||
},
|
},
|
||||||
|
"ListPeerChannels.channels[].ignore_fee_limits": {
|
||||||
|
"added": "v23.08",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
"ListPeerChannels.channels[].in_fulfilled_msat": {
|
"ListPeerChannels.channels[].in_fulfilled_msat": {
|
||||||
"added": "v23.02",
|
"added": "v23.02",
|
||||||
"deprecated": false
|
"deprecated": false
|
||||||
|
|||||||
1
cln-grpc/proto/node.proto
generated
1
cln-grpc/proto/node.proto
generated
@@ -1108,6 +1108,7 @@ message ListpeerchannelsChannels {
|
|||||||
optional bool peer_connected = 2;
|
optional bool peer_connected = 2;
|
||||||
optional ListpeerchannelsChannelsState state = 3;
|
optional ListpeerchannelsChannelsState state = 3;
|
||||||
optional bytes scratch_txid = 4;
|
optional bytes scratch_txid = 4;
|
||||||
|
optional bool ignore_fee_limits = 54;
|
||||||
optional ListpeerchannelsChannelsFeerate feerate = 6;
|
optional ListpeerchannelsChannelsFeerate feerate = 6;
|
||||||
optional string owner = 7;
|
optional string owner = 7;
|
||||||
optional string short_channel_id = 8;
|
optional string short_channel_id = 8;
|
||||||
|
|||||||
1
cln-grpc/src/convert.rs
generated
1
cln-grpc/src/convert.rs
generated
@@ -1003,6 +1003,7 @@ impl From<responses::ListpeerchannelsChannels> for pb::ListpeerchannelsChannels
|
|||||||
peer_connected: c.peer_connected, // Rule #2 for type boolean?
|
peer_connected: c.peer_connected, // Rule #2 for type boolean?
|
||||||
state: c.state.map(|v| v as i32),
|
state: c.state.map(|v| v as i32),
|
||||||
scratch_txid: c.scratch_txid.map(|v| hex::decode(v).unwrap()), // Rule #2 for type txid?
|
scratch_txid: c.scratch_txid.map(|v| hex::decode(v).unwrap()), // Rule #2 for type txid?
|
||||||
|
ignore_fee_limits: c.ignore_fee_limits, // Rule #2 for type boolean?
|
||||||
feerate: c.feerate.map(|v| v.into()),
|
feerate: c.feerate.map(|v| v.into()),
|
||||||
owner: c.owner, // Rule #2 for type string?
|
owner: c.owner, // Rule #2 for type string?
|
||||||
short_channel_id: c.short_channel_id.map(|v| v.to_string()), // Rule #2 for type short_channel_id?
|
short_channel_id: c.short_channel_id.map(|v| v.to_string()), // Rule #2 for type short_channel_id?
|
||||||
|
|||||||
2
cln-rpc/src/model.rs
generated
2
cln-rpc/src/model.rs
generated
@@ -3701,6 +3701,8 @@ pub mod responses {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub scratch_txid: Option<String>,
|
pub scratch_txid: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub ignore_fee_limits: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub feerate: Option<ListpeerchannelsChannelsFeerate>,
|
pub feerate: Option<ListpeerchannelsChannelsFeerate>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub owner: Option<String>,
|
pub owner: Option<String>,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -790,6 +790,7 @@ def listpeerchannels_channels2py(m):
|
|||||||
"peer_connected": m.peer_connected, # PrimitiveField in generate_composite
|
"peer_connected": m.peer_connected, # PrimitiveField in generate_composite
|
||||||
"state": str(m.state), # EnumField in generate_composite
|
"state": str(m.state), # EnumField in generate_composite
|
||||||
"scratch_txid": hexlify(m.scratch_txid), # PrimitiveField in generate_composite
|
"scratch_txid": hexlify(m.scratch_txid), # PrimitiveField in generate_composite
|
||||||
|
"ignore_fee_limits": m.ignore_fee_limits, # PrimitiveField in generate_composite
|
||||||
"owner": m.owner, # PrimitiveField in generate_composite
|
"owner": m.owner, # PrimitiveField in generate_composite
|
||||||
"short_channel_id": m.short_channel_id, # PrimitiveField in generate_composite
|
"short_channel_id": m.short_channel_id, # PrimitiveField in generate_composite
|
||||||
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
|
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ On success, an object containing **channels** is returned. It is an array of ob
|
|||||||
- Bit number
|
- Bit number
|
||||||
- **names** (array of strings): Feature name for each bit set in this channel\_type:
|
- **names** (array of strings): Feature name for each bit set in this channel\_type:
|
||||||
- Name of feature bit (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even")
|
- Name of feature bit (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even")
|
||||||
|
- **ignore\_fee\_limits** (boolean, optional): set if we allow this peer to set fees to anything they want *(added v23.08)*
|
||||||
- **feerate** (object, optional): Feerates for the current tx:
|
- **feerate** (object, optional): Feerates for the current tx:
|
||||||
- **perkw** (u32): Feerate per 1000 weight (i.e kSipa)
|
- **perkw** (u32): Feerate per 1000 weight (i.e kSipa)
|
||||||
- **perkb** (u32): Feerate per 1000 virtual bytes
|
- **perkb** (u32): Feerate per 1000 virtual bytes
|
||||||
@@ -194,4 +195,4 @@ Main web site: <https://github.com/ElementsProject/lightning> Lightning
|
|||||||
RFC site (BOLT \#9):
|
RFC site (BOLT \#9):
|
||||||
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>
|
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>
|
||||||
|
|
||||||
[comment]: # ( SHA256STAMP:f5103dae3b20a7d2a4112a368e753f1dd0518a269bd34c2fd17657c9f90596d7)
|
[comment]: # ( SHA256STAMP:c530e39c9144b5fbef0f6474170865095bd7b4c48e6378fdb7f9a7697b909473)
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ The following tables are currently supported:
|
|||||||
- `row` (reference to `peerchannels_channel_type.rowid`, sqltype `INTEGER`)
|
- `row` (reference to `peerchannels_channel_type.rowid`, sqltype `INTEGER`)
|
||||||
- `arrindex` (index within array, sqltype `INTEGER`)
|
- `arrindex` (index within array, sqltype `INTEGER`)
|
||||||
- `names` (type `string`, sqltype `TEXT`)
|
- `names` (type `string`, sqltype `TEXT`)
|
||||||
|
- `ignore_fee_limits` (type `boolean`, sqltype `INTEGER`)
|
||||||
- `feerate_perkw` (type `u32`, sqltype `INTEGER`, from JSON object `feerate`)
|
- `feerate_perkw` (type `u32`, sqltype `INTEGER`, from JSON object `feerate`)
|
||||||
- `feerate_perkb` (type `u32`, sqltype `INTEGER`, from JSON object `feerate`)
|
- `feerate_perkb` (type `u32`, sqltype `INTEGER`, from JSON object `feerate`)
|
||||||
- `owner` (type `string`, sqltype `TEXT`)
|
- `owner` (type `string`, sqltype `TEXT`)
|
||||||
@@ -510,4 +511,4 @@ RESOURCES
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
Main web site: <https://github.com/ElementsProject/lightning>
|
Main web site: <https://github.com/ElementsProject/lightning>
|
||||||
[comment]: # ( SHA256STAMP:68c72c66bdc8b0515c6d5dddd5ffd14aa0342bd00f17a44929177c48c36a213f)
|
[comment]: # ( SHA256STAMP:4cfeeb2855f92a12d6a52d912a58df7573fc34f1f17a190bba26e46695f54de6)
|
||||||
|
|||||||
@@ -84,6 +84,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ignore_fee_limits": {
|
||||||
|
"type": "boolean",
|
||||||
|
"added": "v23.08",
|
||||||
|
"description": "set if we allow this peer to set fees to anything they want"
|
||||||
|
},
|
||||||
"feerate": {
|
"feerate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Feerates for the current tx",
|
"description": "Feerates for the current tx",
|
||||||
@@ -609,6 +614,7 @@
|
|||||||
"scratch_txid": {},
|
"scratch_txid": {},
|
||||||
"channel_type": {},
|
"channel_type": {},
|
||||||
"feerate": {},
|
"feerate": {},
|
||||||
|
"ignore_fee_limits": {},
|
||||||
"owner": {},
|
"owner": {},
|
||||||
"short_channel_id": {},
|
"short_channel_id": {},
|
||||||
"channel_id": {},
|
"channel_id": {},
|
||||||
@@ -699,6 +705,7 @@
|
|||||||
"scratch_txid": {},
|
"scratch_txid": {},
|
||||||
"channel_type": {},
|
"channel_type": {},
|
||||||
"feerate": {},
|
"feerate": {},
|
||||||
|
"ignore_fee_limits": {},
|
||||||
"owner": {},
|
"owner": {},
|
||||||
"short_channel_id": {},
|
"short_channel_id": {},
|
||||||
"channel_id": {},
|
"channel_id": {},
|
||||||
@@ -788,6 +795,7 @@
|
|||||||
"scratch_txid": {},
|
"scratch_txid": {},
|
||||||
"channel_type": {},
|
"channel_type": {},
|
||||||
"feerate": {},
|
"feerate": {},
|
||||||
|
"ignore_fee_limits": {},
|
||||||
"owner": {},
|
"owner": {},
|
||||||
"short_channel_id": {},
|
"short_channel_id": {},
|
||||||
"channel_id": {},
|
"channel_id": {},
|
||||||
@@ -878,6 +886,7 @@
|
|||||||
"scratch_txid": {},
|
"scratch_txid": {},
|
||||||
"channel_type": {},
|
"channel_type": {},
|
||||||
"feerate": {},
|
"feerate": {},
|
||||||
|
"ignore_fee_limits": {},
|
||||||
"owner": {},
|
"owner": {},
|
||||||
"alias": {},
|
"alias": {},
|
||||||
"short_channel_id": {},
|
"short_channel_id": {},
|
||||||
|
|||||||
@@ -748,6 +748,9 @@ static void json_add_channel(struct lightningd *ld,
|
|||||||
json_add_node_id(response, "peer_id", &peer->id);
|
json_add_node_id(response, "peer_id", &peer->id);
|
||||||
json_add_bool(response, "peer_connected", peer->connected == PEER_CONNECTED);
|
json_add_bool(response, "peer_connected", peer->connected == PEER_CONNECTED);
|
||||||
json_add_channel_type(response, "channel_type", channel->type);
|
json_add_channel_type(response, "channel_type", channel->type);
|
||||||
|
if (channel->ignore_fee_limits) {
|
||||||
|
json_add_bool(response, "ignore_fee_limits", channel->ignore_fee_limits);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
json_add_string(response, "state", channel_state_name(channel));
|
json_add_string(response, "state", channel_state_name(channel));
|
||||||
if (channel->last_tx && !invalid_last_tx(channel->last_tx)) {
|
if (channel->last_tx && !invalid_last_tx(channel->last_tx)) {
|
||||||
|
|||||||
@@ -3762,6 +3762,8 @@ def test_sql(node_factory, bitcoind):
|
|||||||
'type': 'string'},
|
'type': 'string'},
|
||||||
{'name': 'scratch_txid',
|
{'name': 'scratch_txid',
|
||||||
'type': 'txid'},
|
'type': 'txid'},
|
||||||
|
{'name': 'ignore_fee_limits',
|
||||||
|
'type': 'boolean'},
|
||||||
{'name': 'feerate_perkw',
|
{'name': 'feerate_perkw',
|
||||||
'type': 'u32'},
|
'type': 'u32'},
|
||||||
{'name': 'feerate_perkb',
|
{'name': 'feerate_perkb',
|
||||||
|
|||||||
Reference in New Issue
Block a user