Skip to content

Commit

Permalink
listpays: sort output payments
Browse files Browse the repository at this point in the history
Changelog-Added: Sort payments by ID in pay plugin listpays
  • Loading branch information
nalinbhardwaj committed May 9, 2021
1 parent 9825f32 commit 5eb90da
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 131 deletions.
2 changes: 1 addition & 1 deletion lightningd/offer.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static struct command_result *prev_payment(struct command *cmd,
struct tlv_invoice_request *invreq,
u64 **prev_basetime)
{
const struct wallet_payment **payments;
struct wallet_payment **payments;
bool prev_paid = false;

assert(!invreq->payer_info);
Expand Down
6 changes: 3 additions & 3 deletions lightningd/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ send_payment_core(struct lightningd *ld,
struct secret *path_secrets,
const struct sha256 *local_offer_id)
{
const struct wallet_payment **payments, *old_payment = NULL;
struct wallet_payment **payments, *old_payment = NULL;
struct channel *channel;
const u8 *failmsg;
struct htlc_out *hout;
Expand Down Expand Up @@ -1532,7 +1532,7 @@ static struct command_result *json_listsendpays(struct command *cmd,
const jsmntok_t *obj UNNEEDED,
const jsmntok_t *params)
{
const struct wallet_payment **payments;
struct wallet_payment **payments;
struct json_stream *response;
struct sha256 *rhash;
const char *invstring;
Expand Down Expand Up @@ -1602,7 +1602,7 @@ static struct command_result *json_delpay(struct command *cmd,
const jsmntok_t *params)
{
struct json_stream *response;
const struct wallet_payment **payments;
struct wallet_payment **payments;
const char *status_str;
enum wallet_payment_status status;
struct sha256 *payment_hash;
Expand Down
2 changes: 1 addition & 1 deletion wallet/db_postgres_sqlgen.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wallet/db_sqlite3_sqlgen.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5eb90da

Please sign in to comment.