add max_total_htlc_out to listpeerchannels - #8084
Merged
endothermicdev merged 6 commits intoFeb 21, 2025
Merged
Conversation
rustyrussell
force-pushed
the
guilt/pr-7193
branch
2 times, most recently
from
February 13, 2025 04:00
7f6a22d to
9330714
Compare
Contributor
Author
|
Gah, this requires more work. I will rebase on #8089 once that is merged! |
rustyrussell
force-pushed
the
guilt/pr-7193
branch
2 times, most recently
from
February 16, 2025 23:19
bca0265 to
391119d
Compare
endothermicdev
force-pushed
the
guilt/pr-7193
branch
from
February 19, 2025 22:22
391119d to
e69ecbd
Compare
rustyrussell
force-pushed
the
guilt/pr-7193
branch
2 times, most recently
from
February 20, 2025 04:17
4b10c23 to
0ed14c3
Compare
Collaborator
|
But then we later query against all these fields, which isn't allowed for deprecated columns( |
endothermicdev
force-pushed
the
guilt/pr-7193
branch
from
February 20, 2025 20:11
b31e91f to
2a56e44
Compare
ShahanaFarooqui
force-pushed
the
guilt/pr-7193
branch
from
February 20, 2025 21:35
2a56e44 to
cfa069f
Compare
Otherwise, deprecating a field causes SELECT * to fail:
```
> l1.rpc.sql(f"SELECT * FROM peerchannels;")
...
> raise RpcError(method, payload, resp['error'])
E pyln.client.lightning.RpcError: RPC call failed: method: sql, payload: ('SELECT * FROM peerchannels;',), error: {'code': -1, 'message': 'query failed with access to peerchannels.max_total_htlc_in_msat is prohibited (Deprecated column table peerchannels.max_total_htlc_in_msat)'}
```
So if they use a wildcard, allow access: though "SELECT *" is fraught,
"COUNT(*)" is perfectly legit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell
force-pushed
the
guilt/pr-7193
branch
3 times, most recently
from
February 21, 2025 04:06
db089e7 to
4b81a5c
Compare
Changelog-Added: JSON-RPC: `listpeerchannels` new output fields `their_max_total_htlc_out_msat` and `our_max_total_htlc_out_msat` as the value of `max_htlc_value_in_flight` (as of BOLT02) set by the local and remote nodes on channel creation. Changelog-Deprecated: JSON-RPC: `listpeerchannels` value `max_total_htlc_in_msat`: use `our_max_total_htlc_out_msat` instead to follow spec naming convention.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The parameter max_htlc_value_in_flight_msat stablished by peers on channel opening (BOLT02) can now be retrived from the gossmods_from_listpeerchannels API. Adapted the corresponding callback functions in renepay and askrene to take into account that value as a constraint to the value we can send through a channel. Changelog-Add: fetch max_htlc_value_in_flight_msat from gossmods_listpeerchannels API Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell
force-pushed
the
guilt/pr-7193
branch
from
February 21, 2025 04:35
4b81a5c to
9b32ea4
Compare
with fixed our/their_max_htlc_value_in_flight_msat values suggested by @ShahanaFarooqui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was #7193 but I closed that by accident.