aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-05-03 12:36:00 -0400
committerAva Chow <github@achow101.com>2024-05-03 12:36:00 -0400
commitf9486de6a96b624982a2d45b895bfe4e865063d1 (patch)
tree706145d7e578f6cc663388d007ddbbbe844a931d /test
parent70e4d6ff1d269abbda9dafae659e3da3ea17867a (diff)
parentaf3c18169a075222fe0795ab24b8b20ad5e30ae4 (diff)
downloadbitcoin-f9486de6a96b624982a2d45b895bfe4e865063d1.tar.xz
Merge bitcoin/bitcoin#30029: test: remove duplicate `WITNESS_SCALE_FACTOR` constant definition
af3c18169a075222fe0795ab24b8b20ad5e30ae4 [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 af3c18169a075222fe0795ab24b8b20ad5e30ae4 sipa: ACK af3c18169a075222fe0795ab24b8b20ad5e30ae4 achow101: ACK af3c18169a075222fe0795ab24b8b20ad5e30ae4 glozow: lgtm ACK af3c18169a075222fe0795ab24b8b20ad5e30ae4 brunoerg: ACK af3c18169a075222fe0795ab24b8b20ad5e30ae4 willcl-ark: ACK af3c18169a075222fe0795ab24b8b20ad5e30ae4 Tree-SHA512: 6bd8060c9eea10e03940acee2aa4cd08e4e0afb6d26be3e6300ad405fd0af5b373a00e994eb39515a2dcafa1625562bcd57945049a84b9c9dcc7ea60c24f0911
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_taproot.py2
-rw-r--r--test/functional/test_framework/blocktools.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/feature_taproot.py b/test/functional/feature_taproot.py
index e85541d0ec..e7d65b4539 100755
--- a/test/functional/feature_taproot.py
+++ b/test/functional/feature_taproot.py
@@ -10,7 +10,6 @@ from test_framework.blocktools import (
create_block,
add_witness_commitment,
MAX_BLOCK_SIGOPS_WEIGHT,
- WITNESS_SCALE_FACTOR,
)
from test_framework.messages import (
COutPoint,
@@ -20,6 +19,7 @@ from test_framework.messages import (
CTxOut,
SEQUENCE_FINAL,
tx_from_hex,
+ WITNESS_SCALE_FACTOR,
)
from test_framework.script import (
ANNEX_TAG,
diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py
index cfd923bab3..f0dc866f69 100644
--- a/test/functional/test_framework/blocktools.py
+++ b/test/functional/test_framework/blocktools.py
@@ -28,6 +28,7 @@ from .messages import (
ser_uint256,
tx_from_hex,
uint256_from_str,
+ WITNESS_SCALE_FACTOR,
)
from .script import (
CScript,
@@ -45,7 +46,6 @@ from .script_util import (
)
from .util import assert_equal
-WITNESS_SCALE_FACTOR = 4
MAX_BLOCK_SIGOPS = 20000
MAX_BLOCK_SIGOPS_WEIGHT = MAX_BLOCK_SIGOPS * WITNESS_SCALE_FACTOR