Browse Source

wallet: Properly save `wallet_payment::path_secrets`.

Fixes: #657
ppa-0.6.1
ZmnSCPxj 7 years ago
committed by Christian Decker
parent
commit
d2789fd647
  1. 8
      wallet/wallet.c

8
wallet/wallet.c

@ -1287,14 +1287,18 @@ void wallet_payment_store(struct wallet *wallet,
" payment_hash," " payment_hash,"
" destination," " destination,"
" msatoshi," " msatoshi,"
" timestamp" " timestamp,"
") VALUES (?, ?, ?, ?, ?);"); " path_secrets"
") VALUES (?, ?, ?, ?, ?, ?);");
sqlite3_bind_int(stmt, 1, payment->status); sqlite3_bind_int(stmt, 1, payment->status);
sqlite3_bind_sha256(stmt, 2, &payment->payment_hash); sqlite3_bind_sha256(stmt, 2, &payment->payment_hash);
sqlite3_bind_pubkey(stmt, 3, &payment->destination); sqlite3_bind_pubkey(stmt, 3, &payment->destination);
sqlite3_bind_int64(stmt, 4, payment->msatoshi); sqlite3_bind_int64(stmt, 4, payment->msatoshi);
sqlite3_bind_int(stmt, 5, payment->timestamp); sqlite3_bind_int(stmt, 5, payment->timestamp);
sqlite3_bind_blob(stmt, 6, payment->path_secrets,
tal_len(payment->path_secrets),
SQLITE_TRANSIENT);
db_exec_prepared(wallet->db, stmt); db_exec_prepared(wallet->db, stmt);

Loading…
Cancel
Save