Skip to content

[send_btc] get_cch_order return failed ,but ckb payment still return Inflight #980

@gpBlockchain

Description

@gpBlockchain

commit:doitian@327aed0

  1. lnd3 = start new lnd
    lnd3 not connected lnd0
  2. invoice = lnd3.addinvoice(100)
  3. payment = fiber1.send_btc(invoice)
  4. fiber2.send_payment(payment)
    lnd 0 return Failed to find route for payment

2025-12-08 17:05:06.059 [INF] RRPC: Payment stream b2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7 canceled
2025-12-08 17:05:06.061 [WRN] CRTR: failed to get bandwidth for channel 110:1:0: cannot add outgoing htlc to channel 110:1:0 with amount 0 mSAT: commitment transaction dips peer below chan reserve: our balance
2025-12-08 17:05:06.063 [WRN] CRTR: Failed to find route for payment b2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7: unable to find a path to destination
2025-12-08 17:05:06.063 [WRN] CRTR: Marking payment b2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7 permanently failed with no route: no_route
2025-12-08 17:05:06.070 [ERR] CRTR: No route found for payment b2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7
2025-12-08 17:05:06.071 [WRN] PYDB: Payment(b2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7): cannot register HTLC attempt: payment has already failed, current status: Failed
2025-12-08 17:05:06.084 [ERR] CRTR: Payment b2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7 failed: no_route
  1. fiber1.get_cch_order(payment)
    return failed
curl --location 'http://127.0.0.1:8228' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "get_cch_order",
    "params": [
        {
            "payment_hash": "0xb2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7"
        }
    ]
}'
2025-12-08 17:18:42 [connectionpool.py:241][DEBUG] Starting new HTTP connection (1): 127.0.0.1:8228
2025-12-08 17:18:42 [connectionpool.py:544][DEBUG] http://127.0.0.1:8228 "POST / HTTP/1.1" 200 1249
2025-12-08 17:18:42 [fiber_rpc.py:239][DEBUG] response:
{"jsonrpc": "2.0", "id": 42, "result": {"timestamp": "0x693694c1", "expiry": "0x1517f", "ckb_final_tlc_expiry_delta": "0x5265c00", "wrapped_btc_type_script": {"code_hash": "0x102583443ba6cfe5a3ac268bbb4475fb63eb497dce077f126ad3b148d4f4f8f8", "hash_type": "type", "args": "0x32e555f3ff8e135cece1351a6a2971518392c1e30375c1e006ad0ce8eac07947"}, "incoming_invoice": {"Fiber": "fibd1001pqmaqgqqa65qzg7dwfhdd0se0czzy8x8d27dm975dle932gedemrtd09updvvx8u76p7jd4vt2txmftdsvpx303xp862s3ntv9h0g7hjjqy58zq9qy0ggx47upgtxgahysts0rsqghpnw22s54xzmf2h34kslc8ghps0jpcrsr6dxtvu3uyac5mq7yk9uzdfqwr8y07p6gv5wgzjdam0ds4fzk6gm58f2u7a4fywk2v9fh6hfrhufsxql9alesregfml2wvg5vfn6782rf8z0xe5m6ex4wsdyy02nrr2j02ls7lg6f9vg05ymcw2w975hyre5ruu8ykj6pf0k8p6fw6cq3mc350vjs40wckclmqvr4eswmvxjcflxpd5lruus4q3wsgpfttrnsl4nj20q096wgagt473almu4mcpxucvr97cgtvzdw3x58tpz3ycqgq5xlc"}, "outgoing_pay_req": "lnbcrt1u1p5nd9xppp5k233x6s38zr04spl2gsamnm60mvjmjmklzkuyunmln4mxcxmzhnsdq8w3jhxaqcqzzsxqyz5vqsp5sdmpyz53682qsaqujw809495vghspcl2aus7f3uvgaf264slqvcq9qxpqysgqdczldh7qv44qj0pf6pq4m5xwapg2af4jqlu00cdpzveu9y88d62reevhhxl2la9rr9gw828eze258y08hh09gcxa8azfnex6m4k444qp3dtxs8", "payment_hash": "0xb2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7", "amount_sats": "0x64", "fee_sats": "0x0", "status": "failed"}}

  1. fiber2.get_payment(payment)
    return Inflight
    expected: return failed
curl --location 'http://127.0.0.1:8229' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "get_payment",
    "params": [
        {
            "payment_hash": "0xb2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7"
        }
    ]
}'
2025-12-08 17:18:42 [connectionpool.py:241][DEBUG] Starting new HTTP connection (1): 127.0.0.1:8229
2025-12-08 17:18:42 [connectionpool.py:544][DEBUG] http://127.0.0.1:8229 "POST / HTTP/1.1" 200 665
2025-12-08 17:18:42 [fiber_rpc.py:239][DEBUG] response:
{"jsonrpc": "2.0", "id": 42, "result": {"payment_hash": "0xb2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7", "status": "Inflight", "created_at": "0x19afd351590", "last_updated_at": "0x19afd351590", "failed_error": null, "fee": "0x0", "custom_records": null, "routers": [{"nodes": [{"pubkey": "03ab1abde7f01a8abce4bfd9bbe1d334b25ebcd4e6a157dcf8382a211c179cbd35", "amount": "0x64", "channel_outpoint": "0x8ba53ab90a20e78714c2b111f589ee5fae4f77ef5e1384b762a853cf569a98a600000000"}, {"pubkey": "033c142c37679068b96c5a1d48024e27f772ef525437e1214721b59ba8736a1e82", "amount": "0x64", "channel_outpoint": "0x000000000000000000000000000000000000000000000000000000000000000000000000"}]}]}}

  1. fiber2.list_channels({})
    tlc stuck in pending_tlc
2025-12-08 17:18:42 [fiber_rpc.py:229][DEBUG] curl --location 'http://127.0.0.1:8229' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "list_channels",
    "params": [
        {}
    ]
}'
2025-12-08 17:18:42 [connectionpool.py:241][DEBUG] Starting new HTTP connection (1): 127.0.0.1:8229
2025-12-08 17:18:42 [connectionpool.py:544][DEBUG] http://127.0.0.1:8229 "POST / HTTP/1.1" 200 1113
2025-12-08 17:18:42 [fiber_rpc.py:239][DEBUG] response:
{"jsonrpc": "2.0", "id": 42, "result": {"channels": [{"channel_id": "0x0d2ad3e5610db762b7e97d61e9e9b31a115ae7021c1cc5747a50897929779a98", "is_public": true, "channel_outpoint": "0x8ba53ab90a20e78714c2b111f589ee5fae4f77ef5e1384b762a853cf569a98a600000000", "peer_id": "QmZTCtgNFT5Tuci2dpmSSYN15qHYxFubxKYtynhHbW4Abf", "funding_udt_type_script": {"code_hash": "0x102583443ba6cfe5a3ac268bbb4475fb63eb497dce077f126ad3b148d4f4f8f8", "hash_type": "type", "args": "0x32e555f3ff8e135cece1351a6a2971518392c1e30375c1e006ad0ce8eac07947"}, "state": {"state_name": "CHANNEL_READY"}, "local_balance": "0x19968ceb00", "offered_tlc_balance": "0x64", "remote_balance": "0x174876e800", "received_tlc_balance": "0x0", "pending_tlcs": [{"id": "0x1", "amount": "0x64", "payment_hash": "0xb2a3136a113886fac03f5221ddcf7a7ed92dcb76f8adc2727bfcebb360db15e7", "expiry": "0x19b3a25ab93", "status": {"Outbound": "Committed"}}], "latest_commitment_transaction_hash": "0xf9cb8bd0b8a8bb5cff5f07a44acf7804f140c3b94c4408dffd8187867a9b15e9", "created_at": "0x19afd34cb0f", "enabled": true, "tlc_expiry_delta": "0xdbba00", "tlc_fee_proportional_millionths": "0x3e8", "shutdown_transaction_hash": null}]}}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions