Skip to content

Commit f9486de

Browse files
committed
Merge bitcoin/bitcoin#30029: test: remove duplicate WITNESS_SCALE_FACTOR constant definition
af3c181 [test]: remove duplicate WITNESS_SCALE_FACTOR (ismaelsadeeq) Pull request description: Notice this while working on #29523 - `blocktools.py` and `messages.py` both define `WITNESS_SCALE_FACTOR` constant https://github.com/bitcoin/bitcoin/blob/99d7538cdb2a0ab7a7a2116cd5f33b95fc52b00e/test/functional/test_framework/blocktools.py#L48 https://github.com/bitcoin/bitcoin/blob/99d7538cdb2a0ab7a7a2116cd5f33b95fc52b00e/test/functional/test_framework/messages.py#L68 - This PR deletes the one in `blocktools.py` and update the tests to only use `WITNESS_SCALE_FACTOR` from `messages.py` ACKs for top commit: maflcko: ACK af3c181 sipa: ACK af3c181 achow101: ACK af3c181 glozow: lgtm ACK af3c181 brunoerg: ACK af3c181 willcl-ark: ACK af3c181 Tree-SHA512: 6bd8060c9eea10e03940acee2aa4cd08e4e0afb6d26be3e6300ad405fd0af5b373a00e994eb39515a2dcafa1625562bcd57945049a84b9c9dcc7ea60c24f0911
2 parents 70e4d6f + af3c181 commit f9486de

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/functional/feature_taproot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
create_block,
1111
add_witness_commitment,
1212
MAX_BLOCK_SIGOPS_WEIGHT,
13-
WITNESS_SCALE_FACTOR,
1413
)
1514
from test_framework.messages import (
1615
COutPoint,
@@ -20,6 +19,7 @@
2019
CTxOut,
2120
SEQUENCE_FINAL,
2221
tx_from_hex,
22+
WITNESS_SCALE_FACTOR,
2323
)
2424
from test_framework.script import (
2525
ANNEX_TAG,

test/functional/test_framework/blocktools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
ser_uint256,
2929
tx_from_hex,
3030
uint256_from_str,
31+
WITNESS_SCALE_FACTOR,
3132
)
3233
from .script import (
3334
CScript,
@@ -45,7 +46,6 @@
4546
)
4647
from .util import assert_equal
4748

48-
WITNESS_SCALE_FACTOR = 4
4949
MAX_BLOCK_SIGOPS = 20000
5050
MAX_BLOCK_SIGOPS_WEIGHT = MAX_BLOCK_SIGOPS * WITNESS_SCALE_FACTOR
5151

0 commit comments

Comments
 (0)