mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
bitcoin: fix tx weight calculation when there are no witnesses, but will be.
We had an out-by-two error when calculating weights, because we grab weights on unsigned txs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
4dafeede5c
commit
59f1749967
@@ -57,7 +57,7 @@ void wally_txid(const struct wally_tx *wtx, struct bitcoin_txid *txid);
|
||||
u8 *linearize_tx(const tal_t *ctx, const struct bitcoin_tx *tx);
|
||||
u8 *linearize_wtx(const tal_t *ctx, const struct wally_tx *wtx);
|
||||
|
||||
/* Get weight of tx in Sipa. */
|
||||
/* Get weight of tx in Sipa; assumes it will have witnesses! */
|
||||
size_t bitcoin_tx_weight(const struct bitcoin_tx *tx);
|
||||
size_t wally_tx_weight(const struct wally_tx *wtx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user