Return babe configuration information in the babe api epoch functions (#8072)
* Make changes * Add serialize/deserialize, copy babe epoch config defaults from node runtime * Fix line widths and turn default features off for serde * Remove ser/deser from Epoch, fix node-cli * Apply suggestions * Add comment to BABE_GENESIS_EPOCH_CONFIG in bin * Apply suggestions * Add a sketchy migration function * Add a migration test * Check for PendingEpochConfigChange as well * Make epoch_config in node-cli * Move updating EpochConfig out of the if * Fix executor tests * Calculate weight for add_epoch_configurations * Fix babe test * Apply suggestions from code review Co-authored-by:André Silva <123550+andresilva@users.noreply.github.com> * Add more asserts to tests, remove unused changes to primitives/slots * Allow setting the migration pallet prefix * Rename to BabePalletPrefix Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com>
Showing
- substrate/Cargo.lock 1 addition, 0 deletionssubstrate/Cargo.lock
- substrate/bin/node/cli/src/chain_spec.rs 1 addition, 0 deletionssubstrate/bin/node/cli/src/chain_spec.rs
- substrate/bin/node/runtime/src/lib.rs 9 additions, 2 deletionssubstrate/bin/node/runtime/src/lib.rs
- substrate/bin/node/testing/src/genesis.rs 5 additions, 2 deletionssubstrate/bin/node/testing/src/genesis.rs
- substrate/client/consensus/babe/src/lib.rs 1 addition, 0 deletionssubstrate/client/consensus/babe/src/lib.rs
- substrate/frame/babe/src/lib.rs 77 additions, 7 deletionssubstrate/frame/babe/src/lib.rs
- substrate/frame/babe/src/tests.rs 85 additions, 6 deletionssubstrate/frame/babe/src/tests.rs
- substrate/primitives/consensus/babe/Cargo.toml 2 additions, 0 deletionssubstrate/primitives/consensus/babe/Cargo.toml
- substrate/primitives/consensus/babe/src/lib.rs 6 additions, 0 deletionssubstrate/primitives/consensus/babe/src/lib.rs
Please register or sign in to comment