fix(test): wait for block template reset in RpcTruncate#5119
Open
eval-exec wants to merge 2 commits intonervosnetwork:developfrom
Open
fix(test): wait for block template reset in RpcTruncate#5119eval-exec wants to merge 2 commits intonervosnetwork:developfrom
eval-exec wants to merge 2 commits intonervosnetwork:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the RpcTruncate integration test by ensuring the node’s block-template parent is refreshed to the post-truncate tip before proceeding, preventing mining from using a stale pre-truncate parent and avoiding incorrect cell state assertions.
Changes:
- Add a blocking wait after
truncateuntilget_block_templatereportsparent_hash == to_truncate. - Keep the existing tx-pool synchronization and assertions unchanged.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zhangsoledad
approved these changes
Mar 9, 2026
zhangsoledad
approved these changes
Mar 10, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
Problem Summary:
https://github.com/nervosnetwork/ckb/actions/runs/21896507826/job/63217348878?pr=5107
RpcTruncateintegration test can fail in CI aftertruncatewhen subsequent mining still follows a stale block-template parent from the pre-truncate tip, leading tocell1stayingunknowninstead oflive.What is changed and how it works?
What's Changed:
test/src/specs/rpc/truncate.rsto wait until block-templateparent_hashswitches to the truncated tip.Related changes
owner/repo: N/ACheck List
Tests
Side effects