Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[send_payment] When the other node is offline, send_payment is sent. When the other node is online, send_payment will still fails. #334

Open
gpBlockchain opened this issue Nov 22, 2024 · 0 comments

Comments

@gpBlockchain
Copy link
Contributor

  1. node1 open_channel node2
  2. node1 send_payment to node2 return hash
curl --location 'http://127.0.0.1:8327' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
             "target_pubkey": "035424e8c2876a35c05ac7ddb992b70530cb48ff09af7709fab445b6710733a2db",
        "amount": "0x30",
        "keysend": true
        }
    ]
}'
{"jsonrpc":"2.0","result":{"payment_hash":"0x3b58cb4c39582e371b1dda8d7ba6a0cc3e7b78aa7d16c28cca773a65f2610309","status":"Inflight","created_at":"0x193532604a5","last_updated_at":"0x193532604c3","failed_error":"Failed to send onion packet with error UnknownNextPeer"},"id":42}
  1. node2 stop
  2. node1 send_payment to node2 ,return no path found
curl --location 'http://127.0.0.1:8327' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
             "target_pubkey": "035424e8c2876a35c05ac7ddb992b70530cb48ff09af7709fab445b6710733a2db",
        "amount": "0x30",
        "keysend": true
        }
    ]
}'

{"jsonrpc":"2.0","error":{"code":-32000,"message":"Send payment error: Failed to build route, PathFind error: no path found","data":{"target_pubkey":"035424e8c2876a35c05ac7ddb992b70530cb48ff09af7709fab445b6710733a2db","amount":"0x30","payment_hash":null,"final_htlc_expiry_delta":null,"invoice":null,"timeout":null,"max_fee_amount":null,"max_parts":null,"keysend":true,"udt_type_script":null,"allow_self_payment":null}},"id":42}%      
  1. node2 start
  2. node1 send_payment to node2 again ,return no path found
curl --location 'http://127.0.0.1:8327' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
             "target_pubkey": "035424e8c2876a35c05ac7ddb992b70530cb48ff09af7709fab445b6710733a2db",
        "amount": "0x30",
        "keysend": true
        }
    ]
}'

{"jsonrpc":"2.0","error":{"code":-32000,"message":"Send payment error: Failed to build route, PathFind error: no path found","data":{"target_pubkey":"035424e8c2876a35c05ac7ddb992b70530cb48ff09af7709fab445b6710733a2db","amount":"0x30","payment_hash":null,"final_htlc_expiry_delta":null,"invoice":null,"timeout":null,"max_fee_amount":null,"max_parts":null,"keysend":true,"udt_type_script":null,"allow_self_payment":null}},"id":42}
  1. node1 restart
  2. node1 send_payment ,return hash with err
curl --location 'http://127.0.0.1:8327' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
             "target_pubkey": "035424e8c2876a35c05ac7ddb992b70530cb48ff09af7709fab445b6710733a2db",
        "amount": "0x30",
        "keysend": true
        }
    ]
}'

{"jsonrpc":"2.0","result":{"payment_hash":"0x26eb2ea1457f1478e0424f9fa960ae1a337f19716357f6ebd793bd31fd00d9bf","status":"Inflight","created_at":"0x19353286bc7","last_updated_at":"0x19353286be5","failed_error":"Failed to send onion packet with error UnknownNextPeer"},"id":42}

node1.log
restart_node1.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant