Skip to content

Commit

Permalink
Merge #3470
Browse files Browse the repository at this point in the history
3470: fix(tests): get_ancestor_use_skip_list r=zhangsoledad a=zhangsoledad

<!--
Thank you for contributing to nervosnetwork/ckb!

If you haven't already, please read [CONTRIBUTING](https://github.com/nervosnetwork/ckb/blob/develop/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.

PR Title Format:
1. module [, module2, module3]: what's changed
2. *: what's changed
-->

### What problem does this PR solve?

test `get_ancestor_use_skip_list` was broken since #3391

### What is changed and how it works?

Make sure genesis skip_hash is none.


### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- Unit test
- Integration test
- Manual test (add detailed scripts or steps below)
- No code ci-runs-only: [ quick_checks,linters ]

### Release note <!-- Choose from None, Title Only and Note. Bugfixes or new features need a release note. -->

```release-note
None: Exclude this PR from the release note.
```



Co-authored-by: zhangsoledad <[email protected]>
  • Loading branch information
bors[bot] and zhangsoledad authored Jun 29, 2022
2 parents 109cc56 + 020b37a commit 4991395
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sync/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,9 @@ impl HeaderView {
F: FnMut(&Byte32, Option<bool>) -> Option<HeaderView>,
G: Fn(BlockNumber, &HeaderView) -> Option<HeaderView>,
{
if self.inner.is_genesis() {
return;
}
self.skip_hash = self
.clone()
.get_ancestor(
Expand Down

0 comments on commit 4991395

Please sign in to comment.