mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 06:44:24 +01:00
tx: expose elements 'is fee' calculation
we'll use it when figuring out what outputs to account for during a withdrawal.
This commit is contained in:
committed by
Rusty Russell
parent
9c4c0f10fb
commit
3d241bc261
@@ -63,7 +63,7 @@ int bitcoin_tx_add_multi_outputs(struct bitcoin_tx *tx,
|
||||
return tx->wtx->num_outputs;
|
||||
}
|
||||
|
||||
static bool elements_tx_output_is_fee(const struct bitcoin_tx *tx, int outnum)
|
||||
bool elements_tx_output_is_fee(const struct bitcoin_tx *tx, int outnum)
|
||||
{
|
||||
assert(outnum < tx->wtx->num_outputs);
|
||||
return chainparams->is_elements &&
|
||||
|
||||
@@ -172,4 +172,9 @@ bool bitcoin_tx_check(const struct bitcoin_tx *tx);
|
||||
*/
|
||||
void bitcoin_tx_finalize(struct bitcoin_tx *tx);
|
||||
|
||||
/**
|
||||
* Returns true if the given outnum is a fee output
|
||||
*/
|
||||
bool elements_tx_output_is_fee(const struct bitcoin_tx *tx, int outnum);
|
||||
|
||||
#endif /* LIGHTNING_BITCOIN_TX_H */
|
||||
|
||||
Reference in New Issue
Block a user