bitcoin/tx.c: bitcoin_tx_output_get_amount_sat now accepts const transactions.

It is a getter, so, does not change the transaction, so should accept `const`.
This commit is contained in:
ZmnSCPxj jxPCSnmZ
2020-09-08 12:52:02 +09:30
committed by Rusty Russell
parent abc585b7a4
commit 12c9b27838
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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.