log: LogError with FlatFilePos in UndoReadFromDisk#30428
Merged
ryanofsky merged 3 commits intobitcoin:masterfrom Jul 15, 2024
Merged
log: LogError with FlatFilePos in UndoReadFromDisk#30428ryanofsky merged 3 commits intobitcoin:masterfrom
ryanofsky merged 3 commits intobitcoin:masterfrom
Conversation
added 3 commits
July 11, 2024 15:39
Member fields are used read-only in this method.
These errors should never happen in normal operation. If they do, knowing the FlatFilePos may be useful to determine if data corruption happened. Also, handle the error pos.IsNull() as part of OpenUndoFile, because it may as well have happened due to data corruption. This mirrors the LogError behavior from ReadBlockFromDisk.
These errors should never happen. However, when they do happen, it is useful to log the correct error location (function name). For example, this fixes an incorrect "ConnectBlock()" in "WriteUndoDataForBlock".
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Contributor
|
ACK fa14e1d I think this makes sense and mirroring |
This was referenced Jul 12, 2024
Fabcien
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Jun 17, 2025
Summary: > This makes it harder to pass nullptr and cause issues such as > bitcoin/bitcoin@dde7ac5 bitcoin/bitcoin@fa5989d > refactor: Mark IsBlockPruned const > > Member fields are used read-only in this method. bitcoin/bitcoin@aaaa332 This is a partial backport of [[bitcoin/bitcoin#29021 | core#29021]] and [[bitcoin/bitcoin#30428 | core#30428]] Depends on D18256 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D18257
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These errors should never happen in normal operation. If they do,
knowing the
FlatFilePosmay be useful to determine if data corruptionhappened. Also, handle the error
pos.IsNull()as part ofOpenUndoFile,because it may as well have happened due to data corruption.
This mirrors the
LogErrorbehavior fromReadBlockFromDisk.Also, two other fixup commits in this module.