babe: allow skipping over empty epochs (#11727)
* babe: allow skipping epochs in pallet
* babe: detect and skip epochs on client
* babe: cleaner epoch util functions
* babe: add test for runtime handling of skipped epochs
* babe: simpler implementation of client handling of skipped epochs
* babe: test client-side handling of skipped epochs
* babe: add comments on client-side skipped epochs
* babe: remove emptyline
* babe: make it resilient to forks
* babe: typo
* babe: overflow-safe math
* babe: add test for skipping epochs across different forks
* Fix tests
* FMT
Co-authored-by:
Bastian Köcher <info@kchr.de>
Showing
- substrate/client/consensus/babe/src/lib.rs 46 additions, 3 deletionssubstrate/client/consensus/babe/src/lib.rs
- substrate/client/consensus/babe/src/tests.rs 261 additions, 0 deletionssubstrate/client/consensus/babe/src/tests.rs
- substrate/frame/babe/src/lib.rs 29 additions, 20 deletionssubstrate/frame/babe/src/lib.rs
- substrate/frame/babe/src/tests.rs 31 additions, 0 deletionssubstrate/frame/babe/src/tests.rs
- substrate/primitives/consensus/babe/src/lib.rs 19 additions, 0 deletionssubstrate/primitives/consensus/babe/src/lib.rs
Please register or sign in to comment