Add runtime support for `PreRuntime` and `Consensus` digests (#2757)
* Try to fix runtime panic Does not work * Fix trivial typo * Add runtime support for `PreRuntime` and `Consensus` digests Fixes c7d1204c * Fix silly compile error. * Fix overly-long lines Also remove some in-progress code that would not wind up being useful anyway. * Respond to review comments * delete `unset RUSTC_WRAPPER` from scripts/common.sh * delete unnecessary `use aura::AURA_ENGINE_ID` from `node/runtime/src/lib.rs` * add comments explaining why `PreRuntime` and `Consensus` must be special-cased in `core/sr-primitives/lib.rs` * switch to using `$crate::rstd::marker::PhantomData` in `impl_outer_log!` * improve documentation of `DigestItem::Seal` * Fix compilation and add proof that we do not panic Also fix some warnings. * Apply suggestions from code review Mostly for readability Co-Authored-By:Sergei Pepyakin <s.pepyakin@gmail.com> * Apply suggestions from code review Co-Authored-By:
Bastian Köcher <bkchr@users.noreply.github.com> * $crate::rstd::marker::PhantomData → Default::default() The import is still needed, as `Default::default()` can’t be used in patterns. * Bump `spec_version` Also do some reformatting.
Showing
- substrate/core/sr-primitives/src/generic/digest.rs 5 additions, 3 deletionssubstrate/core/sr-primitives/src/generic/digest.rs
- substrate/core/sr-primitives/src/lib.rs 94 additions, 20 deletionssubstrate/core/sr-primitives/src/lib.rs
- substrate/core/sr-sandbox/without_std.rs 1 addition, 1 deletionsubstrate/core/sr-sandbox/without_std.rs
- substrate/node-template/runtime/src/lib.rs 1 addition, 1 deletionsubstrate/node-template/runtime/src/lib.rs
- substrate/node/runtime/src/lib.rs 3 additions, 3 deletionssubstrate/node/runtime/src/lib.rs
- substrate/srml/aura/src/lib.rs 18 additions, 0 deletionssubstrate/srml/aura/src/lib.rs
- substrate/srml/babe/src/lib.rs 19 additions, 3 deletionssubstrate/srml/babe/src/lib.rs
- substrate/srml/consensus/src/lib.rs 1 addition, 0 deletionssubstrate/srml/consensus/src/lib.rs
- substrate/srml/contract/src/account_db.rs 2 additions, 2 deletionssubstrate/srml/contract/src/account_db.rs
Please register or sign in to comment