mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 16:02:38 +00:00
test: fix block file integrity check in feature_blocksxor.py #37051
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!37051
Loading…
Reference in a new issue
No description provided.
Delete branch "test-fix-blocksxor-verifychain-assert"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR is a late follow-up fix for #30657 (commit
faa1b9b0e6): TheverifychainRPC returns false on failure instead of raising, so the block/undo file integrity check after manually un-XORing the files could never fail. Corruption in recent blocks is still caught by the startup check (-checkblocks, default 6), but older blocks are only read by verifychain(nblocks=0), whose result was ignored.The fix can be verified with the following diff, which makes the node write blocks at heights 1-99 without obfuscation (the genesis block is excluded, as it is read back right after writing):
Running the test with this patch applied passes on master, but fails on this PR (use
test_runner.pyto use a fresh blocks cache for each run).The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.lgtm ACK
219c5c8ef7ACK
219c5c8ef7Backported to
32.xin #37052.