Introduce `BlockGap` (#5592)
Previously, block gaps could only be created by warp sync, but block gaps will also be generated by fast sync once #5406 is fixed. This PR is part 1 of the detailed implementation plan in https://github.com/paritytech/polkadot-sdk/issues/5406#issuecomment-2325064863: refactor `BlockGap`. This refactor converts the existing `(NumberFor<Block>, NumberFor<Block>)` into a dedicated `BlockGap<NumberFor<Block>>` struct. This change is purely structural and does not alter existing logic, but lays the groundwork for the follow-up PR. The compatibility concern caused by the new structure is addressed in the second commit. cc @dmitry-markin --------- Co-authored-by:Bastian Köcher <git@kchr.de>
Showing
- prdoc/pr_5592.prdoc 26 additions, 0 deletionsprdoc/pr_5592.prdoc
- substrate/client/consensus/babe/src/lib.rs 4 additions, 2 deletionssubstrate/client/consensus/babe/src/lib.rs
- substrate/client/db/src/lib.rs 48 additions, 25 deletionssubstrate/client/db/src/lib.rs
- substrate/client/db/src/utils.rs 39 additions, 8 deletionssubstrate/client/db/src/utils.rs
- substrate/client/network/sync/src/strategy/chain_sync.rs 2 additions, 2 deletionssubstrate/client/network/sync/src/strategy/chain_sync.rs
- substrate/client/service/src/client/client.rs 2 additions, 3 deletionssubstrate/client/service/src/client/client.rs
- substrate/primitives/blockchain/src/backend.rs 32 additions, 8 deletionssubstrate/primitives/blockchain/src/backend.rs
Please register or sign in to comment