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

waitblockheight timeout causes crash. #4309

Closed
fiatjaf opened this issue Jan 4, 2021 · 0 comments · Fixed by #4317
Closed

waitblockheight timeout causes crash. #4309

fiatjaf opened this issue Jan 4, 2021 · 0 comments · Fixed by #4317
Assignees

Comments

@fiatjaf
Copy link
Contributor

fiatjaf commented Jan 4, 2021

Issue and Steps to Reproduce

If we send a payment with pay and the receiver return an incorrect_or_unknown_payment_details with a fake height like 999999 pay will call waitblockheight, but since that block height won't be reached within the timeout window, it will crash with:

pay: Unexpected result from waitblockheight: {"code":-1,"message":"Timed out."}

Instead it should just abort the payment.

getinfo output

{
   "id": "02c16cca44562b590dd279c942200bdccfd4f990c3a69fad620c10ef2f8228eaff",
   "alias": "@lntxbot",
   "color": "296683",
   "num_peers": 29,
   "num_pending_channels": 1,
   "num_active_channels": 23,
   "num_inactive_channels": 0,
   "address": [
      {
         "type": "ipv4",
         "address": "5.2.67.89",
         "port": 9735
      }
   ],
   "binding": [
      {
         "type": "ipv4",
         "address": "0.0.0.0",
         "port": 9735
      }
   ],
   "version": "v0.9.2-77-g23d4e53",
   "blockheight": 664387,
   "network": "bitcoin",
   "msatoshi_fees_collected": 31959529,
   "fees_collected_msat": "31959529msat",
   "lightning-dir": "/home/fiatjaf/.lightning1/bitcoin"
}
@cdecker cdecker self-assigned this Jan 6, 2021
cdecker added a commit to cdecker/lightning that referenced this issue Jan 6, 2021
cdecker added a commit to cdecker/lightning that referenced this issue Jan 6, 2021
Fixes ElementsProject#4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
cdecker added a commit to cdecker/lightning that referenced this issue Jan 6, 2021
cdecker added a commit to cdecker/lightning that referenced this issue Jan 6, 2021
Fixes ElementsProject#4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
cdecker added a commit to cdecker/lightning that referenced this issue Jan 7, 2021
cdecker added a commit to cdecker/lightning that referenced this issue Jan 7, 2021
Fixes ElementsProject#4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
cdecker added a commit to cdecker/lightning that referenced this issue Jan 7, 2021
cdecker added a commit to cdecker/lightning that referenced this issue Jan 7, 2021
Fixes ElementsProject#4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
cdecker added a commit to cdecker/lightning that referenced this issue Jan 7, 2021
cdecker added a commit to cdecker/lightning that referenced this issue Jan 7, 2021
Fixes ElementsProject#4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
cdecker added a commit that referenced this issue Jan 8, 2021
Fixes #4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
vibhaa pushed a commit to spider-pcn/lightning that referenced this issue Mar 24, 2021
vibhaa pushed a commit to spider-pcn/lightning that referenced this issue Mar 24, 2021
Fixes ElementsProject#4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants