Repository navigation
Conversation
Submit another block in the flush-failure test while its block file still fails to open. Check that `ProcessNewBlock` returns false and reports the block as new.
`AcceptBlock` sets the new-block flag before writing the block, so after a failed write `PeerManagerImpl::ProcessBlock` still updates the peer's last-block time and clears any in-flight request for the block. Set the flag only after updating the block index with the stored block's position.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste 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. |
|
tACK 074945e Verified that the test catches the block write failure and that the flag is only set after the block has been successfully written. nit: You might want to mention in the PR description that it also adds test coverage for failed block writes. |
|
tACK 074945e After this PR, we no longer set For a follow-up, could consider a test of this behavior from the |

Problem: When a block write fails,
AcceptBlockhas already set the new-block flag, so the peer manager still updates the peer's last-block time and clears any in-flight request for the block.Fix: Set the flag only after recording the stored block's position in the block index.