log: reword `signature validations` to `script verification` in `assumevalid` log
What changed, and why it matters
This commit only rewords a log message and updates the matching test. It changes 'signature validations' to 'script verification' in a progress/debug log line and fixes a typo in a comment. There is no functional code change and no security impact.
No action required; this is a non-functional log-message rewording.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies a single LogInfo() call in src/validation.cpp to use the phrase ‘script verification’ instead of ‘signature validations’, and updates the expected log strings in test/functional/feature_assumevalid.py accordingly. It also fixes a minor typo in a test comment (‘and invalid’ -> ‘an invalid’) and updates a copyright year range. The fScriptChecks logic and behavior are unchanged.
Changed components
src/validation.cpp logging outputtest/functional/feature_assumevalid.pyInspect captured patch +13 / −5
diff --git a/src/validation.cpp b/src/validation.cpp
index 8fcc719a..e3714192 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2564,7 +2564,13 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state,
Ticks<MillisecondsDouble>(m_chainman.time_forks) / m_chainman.num_blocks_total);
if (fScriptChecks != m_prev_script_checks_logged && GetRole() == ChainstateRole::NORMAL) {
- LogInfo("%s signature validations at block #%d (%s).", fScriptChecks ? "Enabling" : "Disabling", pindex->nHeight, block_hash.ToString());
+ if (fScriptChecks) {
+ LogInfo("Enabling script verification at block #%d (%s).",
+ pindex->nHeight, block_hash.ToString());
+ } else {
+ LogInfo("Disabling script verification at block #%d (%s).",
+ pindex->nHeight, block_hash.ToString());
+ }
m_prev_script_checks_logged = fScriptChecks;
}
diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py
index 5f7fff82..2cc4c754 100755
--- a/test/functional/feature_assumevalid.py
+++ b/test/functional/feature_assumevalid.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2014-2022 The Bitcoin Core developers
+# Copyright (c) 2014-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for skipping signature validation on old blocks.
@@ -7,8 +7,7 @@
Test logic for skipping signature validation on blocks which we've assumed
valid (https://github.com/bitcoin/bitcoin/pull/9484)
-We build a chain that includes and invalid signature for one of the
-transactions:
+We build a chain that includes an invalid signature for one of the transactions:
0: genesis block
1: block 1 with coinbase transaction output.
@@ -153,7 +152,10 @@ class AssumeValidTest(BitcoinTestFramework):
p2p1 = self.nodes[1].add_p2p_connection(BaseNode())
p2p1.send_header_for_blocks(self.blocks[0:2000])
p2p1.send_header_for_blocks(self.blocks[2000:])
- with self.nodes[1].assert_debug_log(expected_msgs=['Disabling signature validations at block #1', 'Enabling signature validations at block #103']):
+ with self.nodes[1].assert_debug_log(expected_msgs=[
+ "Disabling script verification at block #1",
+ "Enabling script verification at block #103",
+ ]):
# Send all blocks to node1. All blocks will be accepted.
for i in range(2202):
p2p1.send_without_ping(msg_block(self.blocks[i]))
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.