mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 16:44:20 +01:00
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:
committed by
Rusty Russell
parent
abc585b7a4
commit
12c9b27838
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user