askrene-channel-observation -- Command to add a channel observation to a layer
SYNOPSIS
askrene-channel-observation layer short_channel_id_dir amount_msat result
DESCRIPTION
Command added in v26.12.
The askrene-channel-observation RPC command tells askrene about channels we used so it can update its liquidity 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
- result (string) (one of "failed", "accepted", "succeeded"): Whether this payment failed (implying that the available liquidity is below this amount), was accepted (implying that the channel has enough liquidity to forward this amount but the funds did not move) or succeeded (implying that the liquidity has been reduced in this direction)
RETURN VALUE
On success, an object containing observations is returned. It is an array of objects, where each object contains:
- short_channel_id_dir (short_channel_id_dir): The short channel id and direction
- layer (string): The layer his observation belongs to.
- timestamp (u64): The UNIX timestamp when this observation was created.
- amount_msat (msat): The amount involved in the observation.
- result (string) (one of "failed", "accepted", "succeeded"): The result of the observation.
AUTHOR
Lagrang3 [email protected] is mainly responsible.
SEE ALSO
lightning-getroutes(7), lightning-askrene-constrain-channel(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-channel-observation -k "layer"="test_layers" "short_channel_id_dir"="0x0x1/1" "amount_msat"=100000 "result"="accepted"{
"id": "example:askrene-channel-observation#1",
"method": "askrene-channel-observation",
"params": {
"layer": "test_layers",
"short_channel_id_dir": "0x0x1/1",
"amount_msat": 100000,
"result": "accepted"
}
}Response:
{
"observations": [
{
"layer": "test_layers",
"short_channel_id_dir": "0x0x1/1",
"timestamp": 1738000000,
"amount_msat": 100000,
"result": "accepted"
}
]
}