Dual execution (#311)

* Initial logic

* Remove accidental file

* Config

* Remove accidental

* Apply CLI config

* Additional work. Sadly pointless.

* Rearrange everything

* Loop into CLI param

* Implement dual execution

* typo

* fix tests.

* Better docs

* Fix bug

* Add some tests

* Report block information on consensus failure, tests

* Fix test
This commit is contained in:
Gav Wood
2018-07-14 16:10:20 +02:00
committed by GitHub
parent 0665cfa9fc
commit ee31955969
20 changed files with 449 additions and 130 deletions
@@ -69,6 +69,7 @@ decl_module! {
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum Call where aux: T::PublicAux {
fn report_misbehavior(aux, report: MisbehaviorReport<T::Hash, T::BlockNumber>) -> Result = 0;
fn remark(aux, remark: Vec<u8>) -> Result = 1;
}
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
@@ -104,6 +105,11 @@ impl<T: Trait> Module<T> {
Ok(())
}
/// Make some on-chain remark.
fn remark(_aux: &T::PublicAux, _remark: Vec<u8>) -> Result {
Ok(())
}
/// Set the current set of authorities' session keys.
///
/// Called by `next_session` only.