Closed laziobird closed 6 years ago
We debugged this together on Slack and found that the issue is the channel direction was opposite to the payment direction, i.e., the sender did not own any funds on that channel.
It still happens that even the sender has some funds on this channel
/mnt/lightning/cli/lightning-cli listfunds
{
"outputs": [
{
"txid": "9c068e2ab43de874966fe88a573084627d79a5d68329877f1dc594ea331390e1",
"output": 1,
"value": 46836371,
"address": "tb1qv6fz3ssjjk0sraa66j232c5mgkjgwqn0we3w3m",
"status": "confirmed"
}
],
"channels": [
{
"peer_id": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134",
"short_channel_id": "1292519:126:0",
"channel_sat": 12000000,
"channel_total_sat": 12000000,
"funding_txid": "9c068e2ab43de874966fe88a573084627d79a5d68329877f1dc594ea331390e1"
},
{
"peer_id": "03853aae7448f14f67823a57c9f104054349d077ebe96c125ec20a715cdbe0e07c",
"short_channel_id": "1292524:21:0",
"channel_sat": 10224,
"channel_total_sat": 12000000,
"funding_txid": "440753b221e36b8bd25051be70bfb7579197dc0107d577cfd6e4adf56ae96906"
}
]
}
root@iZbp1fvxo1vhii2annlbsoZ:~# /mnt/lightning/cli/lightning-cli pay lntb10n1pdv77xapp50mdqh8mh62t9s6rmqc3ujtxqayezjw2hqns9hetzjj9lgfrk792qdp8veex7mf5x5hryv65ducnvwpwxy6rvnmxxycrqvqcqpxsnzefm9q5lcj7570thtuagksccv65nsft9wt6ksrqtqep2n6u249v72yzk02rszyj4wd959ghkz9kp6j660f4gu3v8la3qcn3k0d00qqwcvrde
{ "code" : 205, "message" : "Could not find a route", "data" :
{
"getroute_tries": 2,
"sendpay_tries": 1,
"failures": [
{
"type": "FAIL_PAYMENT_REPLY",
"erring_index": 0,
"failcode": 4103,
"erring_node": "02c286fc1c87fdc636c152406752cc75ee791450f0f17b8df1da40d24865d8670b",
"erring_channel": "1292524:21:0",
"route": [
{
"id": "03853aae7448f14f67823a57c9f104054349d077ebe96c125ec20a715cdbe0e07c",
"channel": "1292524:21:0",
"msatoshi": 1001,
"delay": 6
}
]
}
]
} }
The invoice from receiver
root@iZbp15g4p48awj8vzjkk1tZ:~# /mnt/lightning/cli/lightning-cli invoice 1000 12 from45.23To168.146Of1000
{
"payment_hash": "7eda0b9f77d29658687b0623c92cc0e93229395704e05be562948bf42476f154",
"expiry_time": 1523549933,
"expires_at": 1523549933,
"bolt11": "lntb10n1pdv77xapp50mdqh8mh62t9s6rmqc3ujtxqayezjw2hqns9hetzjj9lgfrk792qdp8veex7mf5x5hryv65ducnvwpwxy6rvnmxxycrqvqcqpxsnzefm9q5lcj7570thtuagksccv65nsft9wt6ksrqtqep2n6u249v72yzk02rszyj4wd959ghkz9kp6j660f4gu3v8la3qcn3k0d00qqwcvrde"
}
Can you dump listpeers
and look at the spendable_msatoshi
field of the channel? That is the amount of money you can actually spend on that channel without violating the our_channel_reserve_satoshis
value.
There is a channel reserve that we need to respect; we might start out with less than the reserve, but once we own a value we should not go to a lower value (i.e. spend) if the lower value would be less than the reserve. So please notice spendable_msatoshi
first.
Issue and Steps to Reproduce
I have create two lightning node by using c-lightning A:
B:
There is a chanel between A and B:
The channel infomations:
First: I create a invoice in Node A
Secord:In node B, i pay paymenturl to Node A . The result is like this :
The log of node B is this
getinfo
output