Closed antiochp closed 6 years ago
Looked at it again, I believe all the uses of horizon
in sync.rs
are correct. That specific check just handles a corner case to make sure the chain is at least horizon blocks long before really going ahead with asking for the state. However the height and hash at which the set are asked are calculated properly decreasing from the header head.
Ahh that makes sense.
I think we're just using the
horizon
value as-is during fast-sync and not using it relative to the the head. So it is treated effectively as a hard-coded height.https://github.com/mimblewimble/grin/blob/7c3994e5219ea8ca5ba1b744f650ff18df26fe3b/grin/src/sync.rs#L63
https://github.com/mimblewimble/grin/blob/7c3994e5219ea8ca5ba1b744f650ff18df26fe3b/grin/src/sync.rs#L106