state: make bitcoin_commit() take a non-const peer.

We have to sign the commit at this stage, so easiest if peer isn't const
so we can sign it in-place.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-01-22 06:41:47 +10:30
parent 6a7a046f60
commit 79e1c9bb62
2 changed files with 2 additions and 4 deletions

View File

@ -369,8 +369,7 @@ const struct bitcoin_tx *bitcoin_steal(const tal_t *ctx,
struct bitcoin_event *btc); struct bitcoin_event *btc);
/* Create our commit tx */ /* Create our commit tx */
const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, struct peer *peer);
const struct peer *peer);
/* Create a HTLC refund collection */ /* Create a HTLC refund collection */
const struct bitcoin_tx *bitcoin_htlc_timeout(const tal_t *ctx, const struct bitcoin_tx *bitcoin_htlc_timeout(const tal_t *ctx,

View File

@ -894,8 +894,7 @@ const struct bitcoin_tx *bitcoin_steal(const tal_t *ctx,
return bitcoin_tx("steal"); return bitcoin_tx("steal");
} }
const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, struct peer *peer)
const struct peer *peer)
{ {
return bitcoin_tx("our commit"); return bitcoin_tx("our commit");
} }