From 79e1c9bb62764ae26a0fe3a7d1840a28efa96dda Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 22 Jan 2016 06:41:47 +1030 Subject: [PATCH] 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 --- state.h | 3 +-- test/test_state_coverage.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/state.h b/state.h index e2595db81..256592806 100644 --- a/state.h +++ b/state.h @@ -369,8 +369,7 @@ const struct bitcoin_tx *bitcoin_steal(const tal_t *ctx, struct bitcoin_event *btc); /* Create our commit tx */ -const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, - const struct peer *peer); +const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, struct peer *peer); /* Create a HTLC refund collection */ const struct bitcoin_tx *bitcoin_htlc_timeout(const tal_t *ctx, diff --git a/test/test_state_coverage.c b/test/test_state_coverage.c index f5f1141ef..531baec65 100644 --- a/test/test_state_coverage.c +++ b/test/test_state_coverage.c @@ -894,8 +894,7 @@ const struct bitcoin_tx *bitcoin_steal(const tal_t *ctx, return bitcoin_tx("steal"); } -const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, - const struct peer *peer) +const struct bitcoin_tx *bitcoin_commit(const tal_t *ctx, struct peer *peer) { return bitcoin_tx("our commit"); }