Browse Source

channel.psbt: make non-const

We update it in the next patch, which technically breaks this contract.
So we shouldn't have the contract of const on this in the first place
then.
travis-experimental
niftynei 4 years ago
committed by Rusty Russell
parent
commit
c6ad4f9b20
  1. 2
      lightningd/channel.h
  2. 4
      lightningd/dual_open_control.c

2
lightningd/channel.h

@ -150,7 +150,7 @@ struct channel {
u64 rr_number;
/* PSBT, for v2 channels. Saved until it's sent */
const struct wally_psbt *psbt;
struct wally_psbt *psbt;
/* Stashed pps, saved until channeld is started.
* Needed only for v2 channel open flow */

4
lightningd/dual_open_control.c

@ -43,7 +43,9 @@ static void handle_signed_psbt(struct lightningd *ld,
struct commit_rcvd *rcvd)
{
/* Now that we've got the signed PSBT, save it */
rcvd->channel->psbt = tal_steal(rcvd->channel, psbt);
rcvd->channel->psbt =
tal_steal(rcvd->channel,
cast_const(struct wally_psbt *, psbt));
wallet_channel_save(ld->wallet, rcvd->channel);
channel_watch_funding(ld, rcvd->channel);

Loading…
Cancel
Save