Commit ee659df
committed
Stop loading headers twice into
We currently load the headers twice into the header vector in `HeaderSyncManager::load_headers_from_storage`:
- First1. within `storage.load_chain_state`
- And then within `load_headers_from_storage` itself further down
```
2025-12-04T16:05:36.717779Z INFO 🚀 Starting sync from checkpoint at height 1900000 instead of genesis (requested start height: 2200000)
2025-12-04T16:05:36.727966Z INFO ✅ Loaded 2 headers into HeaderSyncManager in 0.00s (1129 headers/sec)
....
2025-12-05T04:31:15.980982Z ERROR Sequential sync manager error handling message: Validation error: Block at height 2300000 does not match checkpoint
```
```
2025-12-04T16:09:37.959349Z INFO 🚀 Starting sync from checkpoint at height 1900000 instead of genesis (requested start height: 2200000)
2025-12-04T16:09:37.966703Z INFO ✅ Loaded 1 headers into HeaderSyncManager in 0.00s (862 headers/sec)
´´´ChainState::headers
1 parent 8e94e50 commit ee659df
File tree
2 files changed
+12
-94
lines changed- dash-spv
- src/sync/headers
- tests
2 files changed
+12
-94
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
111 | | - | |
| 114 | + | |
112 | 115 | | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 124 | | |
205 | 125 | | |
206 | 126 | | |
207 | 127 | | |
208 | | - | |
| 128 | + | |
209 | 129 | | |
| 130 | + | |
210 | 131 | | |
211 | 132 | | |
212 | 133 | | |
213 | 134 | | |
214 | | - | |
| 135 | + | |
215 | 136 | | |
216 | 137 | | |
217 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 346 | + | |
350 | 347 | | |
351 | 348 | | |
352 | 349 | | |
| |||
0 commit comments