askrene-inform-channel -- Command to add channel capacity restrictions to layer
SYNOPSIS
askrene-inform-channel layer short_channel_id_dir amount_msat inform
DESCRIPTION
Command added in v24.11.
The askrene-inform-channel RPC command tells askrene about channels we used so it can update its capacity estimates. For most accuracy, you should remove your own reservations before calling this. It can be applied whether the current channel exists or not.
- layer (string): The name of the layer to apply this change to. Also causes us to consider any reservations which are local to that layer (which is useful for fake channels where
layeris set in anaskrene-reservepathobject). - short_channel_id_dir (short_channel_id_dir): The short channel id and direction to apply this change to.
- amount_msat (msat): The amount we used on the channel
- inform (string) (one of "constrained", "unconstrained", "succeeded"): Whether this payment passed (implying capacity of at least that amount), failed (implying maximum capacity of one msat less), or succeeded (implying capacity has been reduced in this direction)
Ifsucceeded, then animpressionis created and returned, otherwise aconstraintis created and returned.
RETURN VALUE
On success, an object is returned, containing:
- constraints (array of objects):
- short_channel_id_dir (short_channel_id_dir): The short channel id and direction
- layer (string): The name of the layer to apply this change to.
- timestamp (u64): The UNIX timestamp when this constraint was created.
- maximum_msat (msat, optional): The maximum value which this channel could pass.
- minimum_msat (msat, optional): The minimum value which this channel could pass.
- impressions (array of objects) (added v26.09):
- short_channel_id_dir (short_channel_id_dir): The short channel id and direction.
- layer (string): The name of the layer to apply this change to.
- timestamp (u64): The UNIX timestamp when this constraint was created.
- amount_msat (msat): The amount we successfully sent through this channel (implying its capacity is that much less, and the reverse direction that much more)
AUTHOR
Rusty Russell [email protected] is mainly responsible.
SEE ALSO
lightning-getroutes(7), lightning-askrene-disable-node(7), lightning-askrene-create-channel(7), lightning-askrene-listlayers(7), lightning-askrene-age(7)
RESOURCES
Main web site: https://github.com/ElementsProject/lightning
EXAMPLES
Example 1:
Request:
lightning-cli askrene-inform-channel -k "layer"="test_layers" "short_channel_id_dir"="0x0x1/1" "amount_msat"=100000 "inform"="unconstrained"{
"id": "example:askrene-inform-channel#1",
"method": "askrene-inform-channel",
"params": {
"layer": "test_layers",
"short_channel_id_dir": "0x0x1/1",
"amount_msat": 100000,
"inform": "unconstrained"
}
}Response:
{
"constraints": [
{
"layer": "test_layers",
"short_channel_id_dir": "0x0x1/1",
"timestamp": 1738000000,
"minimum_msat": 100000
}
],
"impressions": []
}