test: Remove unused create_coinbase imports
What changed, and why it matters
This commit only removes unused 'create_coinbase' import statements from 17 Bitcoin Core test files. It is a routine code cleanup with no effect on the actual Bitcoin node software or its security.
No security action needed. Treat as normal maintenance/cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes the unused symbol ‘create_coinbase’ from import statements in test/functional/*.py files. No runtime logic in Bitcoin Core is changed; only the functional test suite’s imports are tidied. There is no patch to production consensus, networking, wallet, or RPC code.
Changed components
test/functional/example_test.pytest/functional/feature_assumeutxo.pytest/functional/feature_cltv.pytest/functional/feature_csv_activation.pytest/functional/feature_dersig.pytest/functional/feature_notifications.pytest/functional/feature_versionbits_warning.pytest/functional/p2p_eviction.pytest/functional/p2p_ibd_stalling.pytest/functional/p2p_ibd_txrelay.pytest/functional/p2p_invalid_tx.pytest/functional/p2p_segwit.pytest/functional/p2p_sendheaders.pytest/functional/p2p_unrequested_blocks.pytest/functional/p2p_v2_encrypted.pytest/functional/rpc_invalidateblock.pytest/functional/wallet_resendwallettransactions.pyInspect captured patch +5 / −17
diff --git a/test/functional/example_test.py b/test/functional/example_test.py
index 51fc762a..e5bb2ce0 100755
--- a/test/functional/example_test.py
+++ b/test/functional/example_test.py
@@ -17,7 +17,6 @@ from collections import defaultdict
# Use lexicographically sorted multi-line imports
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.messages import (
CInv,
diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py
index e188d39a..ae130ee2 100755
--- a/test/functional/feature_assumeutxo.py
+++ b/test/functional/feature_assumeutxo.py
@@ -14,7 +14,6 @@ import contextlib
from dataclasses import dataclass
from test_framework.blocktools import (
create_block,
- create_coinbase
)
from test_framework.compressor import (
compress_amount,
diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py
index ee31c3c5..0c5ad951 100755
--- a/test/functional/feature_cltv.py
+++ b/test/functional/feature_cltv.py
@@ -10,7 +10,6 @@ Test that the CHECKLOCKTIMEVERIFY soft-fork activates.
from test_framework.blocktools import (
TIME_GENESIS_BLOCK,
create_block,
- create_coinbase,
)
from test_framework.messages import (
CTransaction,
diff --git a/test/functional/feature_csv_activation.py b/test/functional/feature_csv_activation.py
index 3f8779b1..658b8900 100755
--- a/test/functional/feature_csv_activation.py
+++ b/test/functional/feature_csv_activation.py
@@ -42,7 +42,6 @@ import time
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.p2p import P2PDataStore
from test_framework.script import (
diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py
index e87dd8c8..8c0549c4 100755
--- a/test/functional/feature_dersig.py
+++ b/test/functional/feature_dersig.py
@@ -9,7 +9,6 @@ Test the DERSIG soft-fork activation on regtest.
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.messages import msg_block
from test_framework.p2p import P2PInterface
diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py
index 517af330..71500cc6 100755
--- a/test/functional/feature_notifications.py
+++ b/test/functional/feature_notifications.py
@@ -9,7 +9,6 @@ import platform
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.descriptors import descsum_create
from test_framework.test_framework import BitcoinTestFramework
diff --git a/test/functional/feature_versionbits_warning.py b/test/functional/feature_versionbits_warning.py
index 545b9ec9..e1e9ff43 100755
--- a/test/functional/feature_versionbits_warning.py
+++ b/test/functional/feature_versionbits_warning.py
@@ -10,7 +10,7 @@ soft-forks, and test that warning alerts are generated.
import os
import re
-from test_framework.blocktools import create_block, create_coinbase
+from test_framework.blocktools import create_block
from test_framework.messages import msg_block
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
diff --git a/test/functional/p2p_eviction.py b/test/functional/p2p_eviction.py
index ad0c92e1..c96f2a2c 100755
--- a/test/functional/p2p_eviction.py
+++ b/test/functional/p2p_eviction.py
@@ -16,7 +16,6 @@ import time
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.messages import (
msg_pong,
diff --git a/test/functional/p2p_ibd_stalling.py b/test/functional/p2p_ibd_stalling.py
index d58bc3f1..492df13b 100755
--- a/test/functional/p2p_ibd_stalling.py
+++ b/test/functional/p2p_ibd_stalling.py
@@ -10,7 +10,6 @@ import time
from test_framework.blocktools import (
create_block,
- create_coinbase
)
from test_framework.messages import (
MSG_BLOCK,
diff --git a/test/functional/p2p_ibd_txrelay.py b/test/functional/p2p_ibd_txrelay.py
index 0359013e..e7e23efc 100755
--- a/test/functional/p2p_ibd_txrelay.py
+++ b/test/functional/p2p_ibd_txrelay.py
@@ -11,7 +11,7 @@
from decimal import Decimal
import time
-from test_framework.blocktools import create_block, create_coinbase
+from test_framework.blocktools import create_block
from test_framework.messages import (
CInv,
COIN,
diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py
index ff4919f6..b0855ec9 100755
--- a/test/functional/p2p_invalid_tx.py
+++ b/test/functional/p2p_invalid_tx.py
@@ -5,7 +5,7 @@
"""Test node responses to invalid transactions.
In this test we connect to one node over p2p, and test tx requests."""
-from test_framework.blocktools import create_block, create_coinbase
+from test_framework.blocktools import create_block
from test_framework.messages import (
COIN,
COutPoint,
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index 3da88749..92ebe21a 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -10,7 +10,6 @@ from test_framework.blocktools import (
WITNESS_COMMITMENT_HEADER,
add_witness_commitment,
create_block,
- create_coinbase,
)
from test_framework.messages import (
MAX_BIP125_RBF_SEQUENCE,
diff --git a/test/functional/p2p_sendheaders.py b/test/functional/p2p_sendheaders.py
index 161994af..cc28fc05 100755
--- a/test/functional/p2p_sendheaders.py
+++ b/test/functional/p2p_sendheaders.py
@@ -79,7 +79,7 @@ a. Repeat 100 times:
b. Then send 99 more headers that don't connect.
Expect: getheaders message each time.
"""
-from test_framework.blocktools import create_block, create_coinbase
+from test_framework.blocktools import create_block
from test_framework.messages import CInv
from test_framework.p2p import (
CBlockHeader,
diff --git a/test/functional/p2p_unrequested_blocks.py b/test/functional/p2p_unrequested_blocks.py
index 70f39f7b..64c33c87 100755
--- a/test/functional/p2p_unrequested_blocks.py
+++ b/test/functional/p2p_unrequested_blocks.py
@@ -53,7 +53,7 @@ Node1 is unused in tests 3-7:
import time
-from test_framework.blocktools import create_block, create_coinbase, create_tx_with_script
+from test_framework.blocktools import create_block, create_tx_with_script
from test_framework.messages import CBlockHeader, CInv, MSG_BLOCK, msg_block, msg_headers, msg_inv
from test_framework.p2p import p2p_lock, P2PInterface
from test_framework.test_framework import BitcoinTestFramework
diff --git a/test/functional/p2p_v2_encrypted.py b/test/functional/p2p_v2_encrypted.py
index 2d5df19f..4a054799 100755
--- a/test/functional/p2p_v2_encrypted.py
+++ b/test/functional/p2p_v2_encrypted.py
@@ -7,7 +7,6 @@ Test encrypted v2 p2p proposed in BIP 324
"""
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.p2p import (
P2PDataStore,
diff --git a/test/functional/rpc_invalidateblock.py b/test/functional/rpc_invalidateblock.py
index 5e87ce47..d98d9aa8 100755
--- a/test/functional/rpc_invalidateblock.py
+++ b/test/functional/rpc_invalidateblock.py
@@ -8,7 +8,6 @@ from test_framework.test_framework import BitcoinTestFramework
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE_DESCRIPTOR
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.util import (
assert_equal,
diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py
index 89d22f4b..1b15fa17 100755
--- a/test/functional/wallet_resendwallettransactions.py
+++ b/test/functional/wallet_resendwallettransactions.py
@@ -9,7 +9,6 @@ from decimal import Decimal
from test_framework.blocktools import (
create_block,
- create_coinbase,
)
from test_framework.messages import DEFAULT_MEMPOOL_EXPIRY_HOURS
from test_framework.p2p import P2PTxInvStore
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.