Skip to content

Commit

Permalink
plugins/libplugin-pay.c: Make sure blockheight disagreement does not …
Browse files Browse the repository at this point in the history
…prevent all future progress.
  • Loading branch information
ZmnSCPxj committed Aug 10, 2020
1 parent d701179 commit df42e6a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/libplugin-pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -2555,6 +2555,15 @@ static void waitblockheight_cb(void *d, struct payment *p)
* this. The callback will set it to retry anyway. */
payment_set_step(p, PAYMENT_STEP_RETRY);

/* This will execute after handle_final_failure, which will
* flag the entire payment for abortion.
* Cancel that.
* FIXME: The check for whether this is actually a blockheight
* disagreement should be duplicated in handle_final_failure
* and the root should not be aborted in the first place.
*/
payment_root(p)->abort = false;

req = jsonrpc_request_start(p->plugin, NULL, "waitblockheight",
waitblockheight_rpc_cb,
waitblockheight_rpc_cb, p);
Expand Down

0 comments on commit df42e6a

Please sign in to comment.