Ensure any call to disable peer has a reason (#321)

* Fix warnings in libp2p

* Force a reason when you use the fatalist disable_peer

* Print more information

* Slightly more concise ref-fu

* Tracing for figuring out what's going into genesis

* Merge

* Fxi test
This commit is contained in:
Gav Wood
2018-07-15 23:30:53 +02:00
committed by GitHub
parent 1aeb2825af
commit c78478cf03
23 changed files with 131 additions and 124 deletions
@@ -208,15 +208,14 @@ impl<T: Trait> Default for GenesisConfig<T> {
impl<T: Trait> primitives::BuildStorage for GenesisConfig<T>
{
fn build_storage(self) -> Result<runtime_io::TestExternalities, String> {
use runtime_io::twox_128;
use codec::Encode;
Ok(map![
twox_128(&<BlockHash<T>>::key_for(T::BlockNumber::zero())).to_vec() => [69u8; 32].encode(),
twox_128(<Number<T>>::key()).to_vec() => 1u64.encode(),
twox_128(<ParentHash<T>>::key()).to_vec() => [69u8; 32].encode(),
twox_128(<RandomSeed<T>>::key()).to_vec() => [0u8; 32].encode(),
twox_128(<ExtrinsicIndex<T>>::key()).to_vec() => [0u8; 4].encode()
Self::hash(&<BlockHash<T>>::key_for(T::BlockNumber::zero())).to_vec() => [69u8; 32].encode(),
Self::hash(<Number<T>>::key()).to_vec() => 1u64.encode(),
Self::hash(<ParentHash<T>>::key()).to_vec() => [69u8; 32].encode(),
Self::hash(<RandomSeed<T>>::key()).to_vec() => [0u8; 32].encode(),
Self::hash(<ExtrinsicIndex<T>>::key()).to_vec() => [0u8; 4].encode()
])
}
}