|
|
@ -1617,8 +1617,9 @@ void wallet_payment_store(struct wallet *wallet, |
|
|
|
" timestamp," |
|
|
|
" path_secrets," |
|
|
|
" route_nodes," |
|
|
|
" route_channels" |
|
|
|
") VALUES (?, ?, ?, ?, ?, ?, ?, ?);"); |
|
|
|
" route_channels," |
|
|
|
" msatoshi_sent" |
|
|
|
") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);"); |
|
|
|
|
|
|
|
sqlite3_bind_int(stmt, 1, payment->status); |
|
|
|
sqlite3_bind_sha256(stmt, 2, &payment->payment_hash); |
|
|
@ -1631,6 +1632,7 @@ void wallet_payment_store(struct wallet *wallet, |
|
|
|
sqlite3_bind_pubkey_array(stmt, 7, payment->route_nodes); |
|
|
|
sqlite3_bind_short_channel_id_array(stmt, 8, |
|
|
|
payment->route_channels); |
|
|
|
sqlite3_bind_int64(stmt, 9, payment->msatoshi_sent); |
|
|
|
|
|
|
|
db_exec_prepared(wallet->db, stmt); |
|
|
|
|
|
|
@ -1683,6 +1685,8 @@ static struct wallet_payment *wallet_stmt2payment(const tal_t *ctx, |
|
|
|
payment->route_channels |
|
|
|
= sqlite3_column_short_channel_id_array(payment, stmt, 9); |
|
|
|
|
|
|
|
payment->msatoshi_sent = sqlite3_column_int64(stmt, 10); |
|
|
|
|
|
|
|
return payment; |
|
|
|
} |
|
|
|
|
|
|
@ -1701,7 +1705,8 @@ wallet_payment_by_hash(const tal_t *ctx, struct wallet *wallet, |
|
|
|
stmt = db_prepare(wallet->db, |
|
|
|
"SELECT id, status, destination," |
|
|
|
"msatoshi, payment_hash, timestamp, payment_preimage, " |
|
|
|
"path_secrets, route_nodes, route_channels " |
|
|
|
"path_secrets, route_nodes, route_channels, " |
|
|
|
"msatoshi_sent " |
|
|
|
"FROM payments " |
|
|
|
"WHERE payment_hash = ?"); |
|
|
|
|
|
|
@ -1920,7 +1925,8 @@ wallet_payment_list(const tal_t *ctx, |
|
|
|
wallet->db, |
|
|
|
"SELECT id, status, destination, " |
|
|
|
"msatoshi, payment_hash, timestamp, payment_preimage, " |
|
|
|
"path_secrets, route_nodes, route_channels " |
|
|
|
"path_secrets, route_nodes, route_channels, " |
|
|
|
"msatoshi_sent " |
|
|
|
"FROM payments;"); |
|
|
|
} |
|
|
|
|
|
|
|