mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-22 06:24:22 +01:00
db: save the failcode / failuremsg into db.
Now we can finally move the fixup code under COMPAT_V061, so it's only for old nodes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -963,11 +963,14 @@ static bool test_htlc_crud(struct lightningd *ld, const tal_t *ctx)
|
||||
wallet_err = tal_free(wallet_err);
|
||||
|
||||
/* Update */
|
||||
CHECK_MSG(transaction_wrap(w->db, wallet_htlc_update(w, in.dbid, RCVD_ADD_HTLC, NULL)),
|
||||
CHECK_MSG(transaction_wrap(w->db, wallet_htlc_update(w, in.dbid, RCVD_ADD_HTLC, NULL, 0, NULL)),
|
||||
"Update HTLC with null payment_key failed");
|
||||
CHECK_MSG(
|
||||
transaction_wrap(w->db, wallet_htlc_update(w, in.dbid, SENT_REMOVE_HTLC, &payment_key)),
|
||||
transaction_wrap(w->db, wallet_htlc_update(w, in.dbid, SENT_REMOVE_HTLC, &payment_key, 0, NULL)),
|
||||
"Update HTLC with payment_key failed");
|
||||
CHECK_MSG(
|
||||
transaction_wrap(w->db, wallet_htlc_update(w, in.dbid, SENT_REMOVE_HTLC, NULL, 0, tal_arrz(tmpctx, u8, 100))),
|
||||
"Update HTLC with failreason failed");
|
||||
|
||||
CHECK_MSG(transaction_wrap(w->db, wallet_htlc_save_out(w, chan, &out)),
|
||||
tal_fmt(ctx, "Save htlc_out failed: %s", wallet_err));
|
||||
|
||||
Reference in New Issue
Block a user