Skip to content

Commit

Permalink
Merge bitcoin#30624: doc: Remove outdated nTx faking comment
Browse files Browse the repository at this point in the history
fa04511 doc: Remove outdated nTx faking comment (MarcoFalke)

Pull request description:

  This problematic  `nTx` "faking" was removed in commit b50554b.

  So fix the wrong comment.

  Also, address the typo nits from:

  * bitcoin#29370 (comment)
  * bitcoin#30598 (comment)

ACKs for top commit:
  fjahr:
    ACK fa04511

Tree-SHA512: c918f0b9274be9c347a37d6221915688977a858fb8d2146035718bf17df0bd3b51d67ef12b971556851c0f69f46d26f557c35a5461abeb0683b538b9dc48f5b6
  • Loading branch information
fanquake committed Aug 12, 2024
2 parents d00bf4e + fa04511 commit 40c11ac
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5399,7 +5399,7 @@ void ChainstateManager::CheckBlockIndex()
// and the transactions were not pruned (pindexFirstMissing
// is null), it is a potential candidate. The check
// excludes pruned blocks, because if any blocks were
// pruned between pindex the current chain tip, pindex will
// pruned between pindex and the current chain tip, pindex will
// only temporarily be added to setBlockIndexCandidates,
// before being moved to m_blocks_unlinked. This check
// could be improved to verify that if all blocks between
Expand Down
3 changes: 1 addition & 2 deletions src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,7 @@ class ChainstateManager
//! - Verify that the hash of the resulting coinsdb matches the expected hash
//! per assumeutxo chain parameters.
//! - Wait for our headers chain to include the base block of the snapshot.
//! - "Fast forward" the tip of the new chainstate to the base of the snapshot,
//! faking nTx* block index data along the way.
//! - "Fast forward" the tip of the new chainstate to the base of the snapshot.
//! - Move the new chainstate to `m_snapshot_chainstate` and make it our
//! ChainstateActive().
[[nodiscard]] util::Result<CBlockIndex*> ActivateSnapshot(
Expand Down
2 changes: 0 additions & 2 deletions test/functional/feature_assumeutxo.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ def expected_error(msg):
self.log.info(" - snapshot file referring to a block that is not in the assumeutxo parameters")
prev_block_hash = self.nodes[0].getblockhash(SNAPSHOT_BASE_HEIGHT - 1)
bogus_block_hash = "0" * 64 # Represents any unknown block hash
# The height is not used for anything critical currently, so we just
# confirm the manipulation in the error message
for bad_block_hash in [bogus_block_hash, prev_block_hash]:
with open(bad_snapshot_path, 'wb') as f:
f.write(valid_snapshot_contents[:11] + bytes.fromhex(bad_block_hash)[::-1] + valid_snapshot_contents[43:])
Expand Down

0 comments on commit 40c11ac

Please sign in to comment.