diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 949f3a1de..dea1ca143 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -285,7 +285,7 @@ struct amount_asset bitcoin_tx_output_get_amount(const struct bitcoin_tx *tx, return wally_tx_output_get_amount(&tx->wtx->outputs[outnum]); } -void bitcoin_tx_output_get_amount_sat(struct bitcoin_tx *tx, int outnum, +void bitcoin_tx_output_get_amount_sat(const struct bitcoin_tx *tx, int outnum, struct amount_sat *amount) { struct amount_asset asset_amt; diff --git a/bitcoin/tx.h b/bitcoin/tx.h index 3a56dc0e6..2db9e9506 100644 --- a/bitcoin/tx.h +++ b/bitcoin/tx.h @@ -156,7 +156,7 @@ u8 *bitcoin_tx_output_get_witscript(const tal_t *ctx, const struct bitcoin_tx *t * Internally we use a `wally_tx` to represent the transaction. The * satoshi amount isn't a struct amount_sat, so we need a conversion */ -void bitcoin_tx_output_get_amount_sat(struct bitcoin_tx *tx, int outnum, +void bitcoin_tx_output_get_amount_sat(const struct bitcoin_tx *tx, int outnum, struct amount_sat *amount); /** * Helper to just get an amount_sat for the output amount.