Commit 37668b35 authored by Gav Wood's avatar Gav Wood Committed by Arkadiy Paronyan
Browse files

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
parent d4379e79
......@@ -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]
......
......@@ -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),
}
}
......
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment