Commit 4ee0a46
authored
fix(l1): don't trigger snap sync if fcu head is already canonical (#4985)
**Motivation**
In hive tests we often receive an fcu with either the genesis or last
imported block as head to notify the node that it is already synced. As
this is not usual in a real-case scenario, we just trigger a snap sync
to the advertised head. This PR solves this by first checking if the fcu
head is already part of our canonic chain before triggering a sync
<!-- Why does this pull request exist? What are its goals? -->
**Description**
* When handling a forkchoice in snap sync mode, check that the head is
not already canonical before triggering a sync, if it is already
canonical, apply the forkchoice
<!-- A clear and concise general description of the changes this PR
introduces -->
<!-- Link to issues: Resolves #111, Resolves #222 -->
Closes #48461 parent c394979 commit 4ee0a46
File tree
2 files changed
+18
-4
lines changed- crates/networking
- p2p
- rpc/engine
2 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
223 | 232 | | |
224 | 233 | | |
225 | 234 | | |
| |||
0 commit comments