mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
paymod: Activate paymod and move legacy pay to legacypay command
As suggested during the paymod-03 review it is better to activate the new code right away, and give users an escape hatch to use the legacy code instead. The way I implemented it allows using either `legacypay` or `pay` and then set `legacy` to switch to the other implementation. Changelog-Added: JSON-RPC: The `pay` command now uses the new payment flow, the new `legacypay` command can be used to issue payment with the legacy code if required. Suggested-by: Rusty Russell <@rustyrussell> Suggested-by: ZmnSCPxj <@zmnscpxj>
This commit is contained in:
committed by
Rusty Russell
parent
514c4044c8
commit
5776a33116
@@ -1084,7 +1084,7 @@ static void payment_finished(struct payment *p)
|
||||
return;
|
||||
} else if (result.failure == NULL || result.failure->failcode < NODE) {
|
||||
/* This is failing because we have no more routes to try */
|
||||
ret = jsonrpc_stream_fail(cmd, PAY_ROUTE_NOT_FOUND,
|
||||
ret = jsonrpc_stream_fail(cmd, PAY_STOPPED_RETRYING,
|
||||
NULL);
|
||||
json_add_string(
|
||||
ret, "message",
|
||||
|
||||
Reference in New Issue
Block a user