mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
log: reword signature validations to script verification in assumevalid log
Even though not all script verification is turned off currently (e.g. we're still doing the cheaper sigop counts), this naming is more consistent with other usages.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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]))
|
||||
|
||||
Reference in New Issue
Block a user