Skip to content

Commit

Permalink
fixup! inflight: Add ability to delete an inflight
Browse files Browse the repository at this point in the history
  • Loading branch information
ddustin committed Feb 10, 2024
1 parent 7278da2 commit ce2255e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce2255e

Please sign in to comment.