From ce2255eb14c899bedcf123e9615db82b37848979 Mon Sep 17 00:00:00 2001 From: Dusty Daemon Date: Sat, 10 Feb 2024 12:36:54 -0500 Subject: [PATCH] fixup! inflight: Add ability to delete an inflight --- wallet/wallet.c | 6 ++---- wallet/wallet.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/wallet/wallet.c b/wallet/wallet.c index fe4bf93a55be..1303e9d9cbe5 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -1259,8 +1259,8 @@ void wallet_inflight_add(struct wallet *w, struct channel_inflight *inflight) tal_free(stmt); } -void wallet_inflight_del(struct wallet *w, struct channel *chan, - struct channel_inflight *inflight) +void wallet_inflight_del(struct wallet *w, const struct channel *chan, + const struct channel_inflight *inflight) { struct db_stmt *stmt; @@ -1273,8 +1273,6 @@ void wallet_inflight_del(struct wallet *w, struct channel *chan, db_bind_txid(stmt, &inflight->funding->outpoint.txid); db_bind_int(stmt, inflight->funding->outpoint.n); db_exec_prepared_v2(take(stmt)); - - tal_free(inflight); } void wallet_inflight_save(struct wallet *w, diff --git a/wallet/wallet.h b/wallet/wallet.h index 15bd1276ef71..c54ab9ec9637 100644 --- a/wallet/wallet.h +++ b/wallet/wallet.h @@ -623,8 +623,8 @@ void wallet_inflight_add(struct wallet *w, struct channel_inflight *inflight); /** * Delete an inflight transaction for a channel */ -void wallet_inflight_del(struct wallet *w, struct channel *chan, - struct channel_inflight *inflight); +void wallet_inflight_del(struct wallet *w, const struct channel *chan, + const struct channel_inflight *inflight); /** * Update an existing inflight channel transaction