Description
I’ve two friends: p1 and p2 working lightning-core
p1 opened a channel to p2 and p2 opened one other channel to p1.
Now p2 has two channels. One with outbound funding and one with 0. Output of listfunds
:
"channels": [
{
"peer_id": "02e7b2196a87513ef322fc2c23d5739ed4ac696a9010a855dbfe7185fe8e133c93",
"connected": true,
"state": "CHANNELD_NORMAL",
"short_channel_id": "2410508x70x0",
"channel_sat": 0,
"our_amount_msat": "0msat",
"channel_total_sat": 113495,
"amount_msat": "113495000msat",
"funding_txid": "1f5284dbfcaf76e8a333c1c607465a9474294f43cfbcbbb34504d97aac2189a4",
"funding_output": 0
},
{
"peer_id": "02e7b2196a87513ef322fc2c23d5739ed4ac696a9010a855dbfe7185fe8e133c93",
"connected": true,
"state": "CHANNELD_NORMAL",
"short_channel_id": "2410509x222x0",
"channel_sat": 90433,
"our_amount_msat": "90433000msat",
"channel_total_sat": 90433,
"amount_msat": "90433000msat",
"funding_txid": "befde7cbd4965f21fe9df3a1f06eb1968109a7246457aabed58bfe39f6694b08",
"funding_output": 0
}
]
Drawback
Now I attempted to pay
a 1000msat p1 bill from p2 and get the error:
failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capability exceeded – HTLC charge: 183sat)
I feel it’s because p2 tries to ship utilizing the not funded channel 2410508x70x0
. As a result of if I delete this channel, all works as anticipated.
Further data:
Additionally getroute
reveals that channel 2410508x70x0 is used:
$ lightning-cli --testnet getroute 02e7b2196a87513ef322fc2c23d5739ed4ac696a9010a855dbfe7185fe8e133c93 1000 0
{
"route": [
{
"id": "02e7b2196a87513ef322fc2c23d5739ed4ac696a9010a855dbfe7185fe8e133c93",
"channel": "2410508x70x0",
"direction": 1,
"msatoshi": 1000,
"amount_msat": "1000msat",
"delay": 9,
"style": "tlv"
}
]
}
Questions
- Why does p2 doesn’t auto choose the funded channel?
- Is there a technique to choose the channel? I didn’t discover an possibility for
pay
.