Skip to content

Commit 85abaa6

Browse files
committed
renepay: remove unnecessary rpc call
Remove unnecessary rpc call to waitblockheight at the default payment's ending. Changelog-None. Signed-off-by: Lagrang3 <[email protected]>
1 parent 4c8f678 commit 85abaa6

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

plugins/renepay/mods.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -880,25 +880,11 @@ REGISTER_PAYMENT_MODIFIER(collect_results, collect_results_cb);
880880
*
881881
* The default ending of a payment.
882882
*/
883-
static struct command_result *end_done(struct command *cmd UNUSED,
884-
const char *method UNUSED,
885-
const char *buf UNUSED,
886-
const jsmntok_t *result UNUSED,
887-
struct payment *payment)
883+
static struct command_result *end_cb(struct payment *payment)
888884
{
889885
return payment_fail(payment, PAY_STOPPED_RETRYING,
890886
"Payment execution ended without success.");
891887
}
892-
static struct command_result *end_cb(struct payment *payment)
893-
{
894-
struct command *cmd = payment_command(payment);
895-
assert(cmd);
896-
struct out_req *req =
897-
jsonrpc_request_start(cmd, "waitblockheight", end_done,
898-
payment_rpc_failure, payment);
899-
json_add_num(req->js, "blockheight", 0);
900-
return send_outreq(req);
901-
}
902888

903889
REGISTER_PAYMENT_MODIFIER(end, end_cb);
904890

0 commit comments

Comments
 (0)