mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
wallet: sort listsendpays by ID
Changelog-Changed: JSON: `listsendpays` output is now ordered by `id`.
This commit is contained in:
parent
0ed7c0d083
commit
a88a6e604c
6
wallet/db_postgres_sqlgen.c
generated
6
wallet/db_postgres_sqlgen.c
generated
@ -1593,8 +1593,8 @@ struct db_query db_postgres_queries[] = {
|
||||
.readonly = false,
|
||||
},
|
||||
{
|
||||
.name = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ?;",
|
||||
.query = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = $1;",
|
||||
.name = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ? ORDER BY id;",
|
||||
.query = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = $1 ORDER BY id;",
|
||||
.placeholders = 1,
|
||||
.readonly = true,
|
||||
},
|
||||
@ -1906,4 +1906,4 @@ struct db_query db_postgres_queries[] = {
|
||||
|
||||
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
|
||||
|
||||
// SHA256STAMP:3ab5cc5d3610b26e4df12de155aa85990ac825c0e75a1adf410e67e2ca173327
|
||||
// SHA256STAMP:435d8c98449934c86167d11929b515312babce55bae5487dc3cdc201cb4ba0fe
|
||||
|
6
wallet/db_sqlite3_sqlgen.c
generated
6
wallet/db_sqlite3_sqlgen.c
generated
@ -1593,8 +1593,8 @@ struct db_query db_sqlite3_queries[] = {
|
||||
.readonly = false,
|
||||
},
|
||||
{
|
||||
.name = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ?;",
|
||||
.query = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ?;",
|
||||
.name = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ? ORDER BY id;",
|
||||
.query = "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ? ORDER BY id;",
|
||||
.placeholders = 1,
|
||||
.readonly = true,
|
||||
},
|
||||
@ -1906,4 +1906,4 @@ struct db_query db_sqlite3_queries[] = {
|
||||
|
||||
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
|
||||
|
||||
// SHA256STAMP:3ab5cc5d3610b26e4df12de155aa85990ac825c0e75a1adf410e67e2ca173327
|
||||
// SHA256STAMP:435d8c98449934c86167d11929b515312babce55bae5487dc3cdc201cb4ba0fe
|
||||
|
96
wallet/statements_gettextgen.po
generated
96
wallet/statements_gettextgen.po
generated
@ -1055,190 +1055,190 @@ msgid "UPDATE payments SET failonionreply=? , faildestperm=? , failind
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3160
|
||||
msgid "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ?;"
|
||||
msgid "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE payment_hash = ? ORDER BY id;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3182
|
||||
#: wallet/wallet.c:3183
|
||||
msgid "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments ORDER BY id;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3233
|
||||
#: wallet/wallet.c:3234
|
||||
msgid "SELECT id, status, destination, msatoshi, payment_hash, timestamp, payment_preimage, path_secrets, route_nodes, route_channels, msatoshi_sent, description, bolt11, failonionreply, total_msat, partid, local_offer_id FROM payments WHERE local_offer_id = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3278
|
||||
#: wallet/wallet.c:3279
|
||||
msgid "DELETE FROM htlc_sigs WHERE channelid = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3285
|
||||
#: wallet/wallet.c:3286
|
||||
msgid "INSERT INTO htlc_sigs (channelid, signature) VALUES (?, ?)"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3297
|
||||
#: wallet/wallet.c:3298
|
||||
msgid "SELECT blobval FROM vars WHERE name='genesis_hash'"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3321
|
||||
#: wallet/wallet.c:3322
|
||||
msgid "INSERT INTO vars (name, blobval) VALUES ('genesis_hash', ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3339
|
||||
#: wallet/wallet.c:3340
|
||||
msgid "SELECT txid, outnum FROM utxoset WHERE spendheight < ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3351
|
||||
#: wallet/wallet.c:3352
|
||||
msgid "DELETE FROM utxoset WHERE spendheight < ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3359 wallet/wallet.c:3473
|
||||
#: wallet/wallet.c:3360 wallet/wallet.c:3474
|
||||
msgid "INSERT INTO blocks (height, hash, prev_hash) VALUES (?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3378
|
||||
#: wallet/wallet.c:3379
|
||||
msgid "DELETE FROM blocks WHERE hash = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3384
|
||||
#: wallet/wallet.c:3385
|
||||
msgid "SELECT * FROM blocks WHERE height >= ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3393
|
||||
#: wallet/wallet.c:3394
|
||||
msgid "DELETE FROM blocks WHERE height > ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3405
|
||||
#: wallet/wallet.c:3406
|
||||
msgid "UPDATE outputs SET spend_height = ?, status = ? WHERE prev_out_tx = ? AND prev_out_index = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3423
|
||||
#: wallet/wallet.c:3424
|
||||
msgid "UPDATE utxoset SET spendheight = ? WHERE txid = ? AND outnum = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3446 wallet/wallet.c:3484
|
||||
#: wallet/wallet.c:3447 wallet/wallet.c:3485
|
||||
msgid "INSERT INTO utxoset ( txid, outnum, blockheight, spendheight, txindex, scriptpubkey, satoshis) VALUES(?, ?, ?, ?, ?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3510
|
||||
#: wallet/wallet.c:3511
|
||||
msgid "SELECT height FROM blocks WHERE height = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3523
|
||||
#: wallet/wallet.c:3524
|
||||
msgid "SELECT txid, spendheight, scriptpubkey, satoshis FROM utxoset WHERE blockheight = ? AND txindex = ? AND outnum = ? AND spendheight IS NULL"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3565
|
||||
#: wallet/wallet.c:3566
|
||||
msgid "SELECT blockheight, txindex, outnum FROM utxoset WHERE spendheight = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3596 wallet/wallet.c:3756
|
||||
#: wallet/wallet.c:3597 wallet/wallet.c:3757
|
||||
msgid "SELECT blockheight FROM transactions WHERE id=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3606
|
||||
#: wallet/wallet.c:3607
|
||||
msgid "INSERT INTO transactions ( id, blockheight, txindex, rawtx) VALUES (?, ?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3627
|
||||
#: wallet/wallet.c:3628
|
||||
msgid "UPDATE transactions SET blockheight = ?, txindex = ? WHERE id = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3644
|
||||
#: wallet/wallet.c:3645
|
||||
msgid "INSERT INTO transaction_annotations (txid, idx, location, type, channel) VALUES (?, ?, ?, ?, ?) ON CONFLICT(txid,idx) DO NOTHING;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3676
|
||||
#: wallet/wallet.c:3677
|
||||
msgid "SELECT type, channel_id FROM transactions WHERE id=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3692
|
||||
#: wallet/wallet.c:3693
|
||||
msgid "UPDATE transactions SET type = ?, channel_id = ? WHERE id = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3711
|
||||
#: wallet/wallet.c:3712
|
||||
msgid "SELECT type FROM transactions WHERE id=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3734
|
||||
#: wallet/wallet.c:3735
|
||||
msgid "SELECT rawtx FROM transactions WHERE id=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3780
|
||||
#: wallet/wallet.c:3781
|
||||
msgid "SELECT blockheight, txindex FROM transactions WHERE id=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3808
|
||||
#: wallet/wallet.c:3809
|
||||
msgid "SELECT id FROM transactions WHERE blockheight=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3827
|
||||
#: wallet/wallet.c:3828
|
||||
msgid "INSERT INTO channeltxs ( channel_id, type, transaction_id, input_num, blockheight) VALUES (?, ?, ?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3851
|
||||
#: wallet/wallet.c:3852
|
||||
msgid "SELECT DISTINCT(channel_id) FROM channeltxs WHERE type = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3872
|
||||
#: wallet/wallet.c:3873
|
||||
msgid "SELECT c.type, c.blockheight, t.rawtx, c.input_num, c.blockheight - t.blockheight + 1 AS depth, t.id as txid FROM channeltxs c JOIN transactions t ON t.id = c.transaction_id WHERE c.channel_id = ? ORDER BY c.id ASC;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3917
|
||||
#: wallet/wallet.c:3918
|
||||
msgid "UPDATE forwarded_payments SET in_msatoshi=?, out_msatoshi=?, state=?, resolved_time=?, failcode=? WHERE in_htlc_id=?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:3975
|
||||
#: wallet/wallet.c:3976
|
||||
msgid "INSERT INTO forwarded_payments ( in_htlc_id, out_htlc_id, in_channel_scid, out_channel_scid, in_msatoshi, out_msatoshi, state, received_time, resolved_time, failcode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4034
|
||||
#: wallet/wallet.c:4035
|
||||
msgid "SELECT CAST(COALESCE(SUM(in_msatoshi - out_msatoshi), 0) AS BIGINT)FROM forwarded_payments WHERE state = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4083
|
||||
#: wallet/wallet.c:4084
|
||||
msgid "SELECT f.state, in_msatoshi, out_msatoshi, hin.payment_hash as payment_hash, in_channel_scid, out_channel_scid, f.received_time, f.resolved_time, f.failcode FROM forwarded_payments f LEFT JOIN channel_htlcs hin ON (f.in_htlc_id = hin.id) WHERE (1 = ? OR f.state = ?) AND (1 = ? OR f.in_channel_scid = ?) AND (1 = ? OR f.out_channel_scid = ?)"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4205
|
||||
#: wallet/wallet.c:4206
|
||||
msgid "SELECT t.id, t.rawtx, t.blockheight, t.txindex, t.type as txtype, c2.short_channel_id as txchan, a.location, a.idx as ann_idx, a.type as annotation_type, c.short_channel_id FROM transactions t LEFT JOIN transaction_annotations a ON (a.txid = t.id) LEFT JOIN channels c ON (a.channel = c.id) LEFT JOIN channels c2 ON (t.channel_id = c2.id) ORDER BY t.blockheight, t.txindex ASC"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4299
|
||||
#: wallet/wallet.c:4300
|
||||
msgid "INSERT INTO penalty_bases ( channel_id, commitnum, txid, outnum, amount) VALUES (?, ?, ?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4324
|
||||
#: wallet/wallet.c:4325
|
||||
msgid "SELECT commitnum, txid, outnum, amount FROM penalty_bases WHERE channel_id = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4348
|
||||
#: wallet/wallet.c:4349
|
||||
msgid "DELETE FROM penalty_bases WHERE channel_id = ? AND commitnum = ?"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4366
|
||||
#: wallet/wallet.c:4367
|
||||
msgid "SELECT 1 FROM offers WHERE offer_id = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4379
|
||||
#: wallet/wallet.c:4380
|
||||
msgid "INSERT INTO offers ( offer_id, bolt12, label, status) VALUES (?, ?, ?, ?);"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4406
|
||||
#: wallet/wallet.c:4407
|
||||
msgid "SELECT bolt12, label, status FROM offers WHERE offer_id = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4434
|
||||
#: wallet/wallet.c:4435
|
||||
msgid "SELECT offer_id FROM offers;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4460
|
||||
#: wallet/wallet.c:4461
|
||||
msgid "UPDATE offers SET status=? WHERE offer_id = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4471
|
||||
#: wallet/wallet.c:4472
|
||||
msgid "UPDATE invoices SET state=? WHERE state=? AND local_offer_id = ?;"
|
||||
msgstr ""
|
||||
|
||||
#: wallet/wallet.c:4499
|
||||
#: wallet/wallet.c:4500
|
||||
msgid "SELECT status FROM offers WHERE offer_id = ?;"
|
||||
msgstr ""
|
||||
|
||||
@ -1257,4 +1257,4 @@ msgstr ""
|
||||
#: wallet/test/run-wallet.c:1647
|
||||
msgid "INSERT INTO channels (id) VALUES (1);"
|
||||
msgstr ""
|
||||
# SHA256STAMP:5d466ed1c95975f0155bdb67e995c14b7927634e810d319c1ba616327c37d80a
|
||||
# SHA256STAMP:fdfbb1278ba9e09884c9205e54fc16bb9e66a0362a5aaad11a7efd42746d8e72
|
||||
|
@ -3176,7 +3176,8 @@ wallet_payment_list(const tal_t *ctx,
|
||||
", partid"
|
||||
", local_offer_id"
|
||||
" FROM payments"
|
||||
" WHERE payment_hash = ?;"));
|
||||
" WHERE payment_hash = ?"
|
||||
" ORDER BY id;"));
|
||||
db_bind_sha256(stmt, 0, payment_hash);
|
||||
} else {
|
||||
stmt = db_prepare_v2(wallet->db, SQL("SELECT"
|
||||
|
Loading…
Reference in New Issue
Block a user