mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 12:44:26 +01:00
feerate: remove duplicate method
is dupe of `bitcoin_tx_core_weight`
This commit is contained in:
@@ -39,12 +39,3 @@ const char *feerate_style_name(enum feerate_style style)
|
||||
}
|
||||
abort();
|
||||
}
|
||||
|
||||
size_t common_weight(size_t num_inputs, size_t num_outputs)
|
||||
{
|
||||
/*(nVersion + num inputs + num outputs + locktime) * 4
|
||||
* + SegWit marker + SegWit flag */
|
||||
return (4 + varint_size(num_inputs) +
|
||||
varint_size(num_outputs) + 4) * 4
|
||||
+ 1 + 1;
|
||||
}
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
*/
|
||||
#define FEERATE_FLOOR 253
|
||||
|
||||
/*
|
||||
* This is the net common weight of a transaction.
|
||||
*/
|
||||
size_t common_weight(size_t num_inputs, size_t num_outputs);
|
||||
|
||||
enum feerate_style {
|
||||
FEERATE_PER_KSIPA,
|
||||
FEERATE_PER_KBYTE
|
||||
|
||||
@@ -279,7 +279,8 @@ static bool check_balances(struct state *state,
|
||||
if (check_opener_balance) {
|
||||
u8 *funding_wscript;
|
||||
|
||||
weight = common_weight(psbt->num_inputs, psbt->num_outputs);
|
||||
weight = bitcoin_tx_core_weight(psbt->num_inputs,
|
||||
psbt->num_outputs);
|
||||
funding_wscript = bitcoin_redeem_2of2(tmpctx,
|
||||
&state->our_funding_pubkey,
|
||||
&state->their_funding_pubkey);
|
||||
|
||||
Reference in New Issue
Block a user