Fix and cleanups (#314)

* Cleanups (remove genesis.wasm & nicer errors)

- Pretty errors for version mismatch
- Remove the need for genesis wasm

* Remove unneeded wasm files

* Improve code of conduct

* Leaner code

* Test fixes

* fix tests

* Fix consensus checking
This commit is contained in:
Gav Wood
2018-07-15 00:30:13 +02:00
committed by Arkadiy Paronyan
parent 161dce3699
commit 257c6d240f
6 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ mod tests {
timestamp: Some(Default::default()),
};
::client::new_in_mem(LocalDispatch::new(), genesis_config).unwrap()
::client::new_in_mem(LocalDispatch::with_heap_pages(8), genesis_config).unwrap()
}
#[test]
+2 -1
View File
@@ -56,6 +56,7 @@ fn start_bft<F, C>(
C: bft::BlockImport<Block> + bft::Authorities<Block> + 'static,
F::Error: ::std::fmt::Debug,
<F::Proposer as bft::Proposer<Block>>::Error: ::std::fmt::Display + Into<error::Error>,
<F as bft::Environment<Block>>::Error: ::std::fmt::Display
{
let mut handle = LocalThreadHandle::current();
match bft_service.build_upon(&header) {
@@ -63,7 +64,7 @@ fn start_bft<F, C>(
debug!(target: "bft", "Couldn't initialize BFT agreement: {:?}", e);
},
Ok(None) => {},
Err(e) => debug!(target: "bft", "BFT agreement error: {:?}", e),
Err(e) => warn!(target: "bft", "BFT agreement error: {}", e),
}
}
Binary file not shown.
+1 -1
View File
@@ -38,7 +38,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
];
GenesisConfig {
consensus: Some(ConsensusConfig {
code: include_bytes!("../../runtime/wasm/genesis.wasm").to_vec(), // TODO change
code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(), // TODO change
authorities: initial_authorities.clone(),
}),
system: None,