Remove PoC-1 back-compat hacks (#709)

* Remove PoC-1 back-compat hacks

* Fix lingering Keccak references

* More keccak exorcism

* Fix test

* Final fixes
This commit is contained in:
Gav Wood
2018-09-11 15:17:07 +02:00
committed by GitHub
parent fd2ec13ed8
commit 418a9bf243
66 changed files with 241 additions and 354 deletions
+7 -7
View File
@@ -33,7 +33,7 @@ use primitives::{
AccountId, Block, BlockId, Hash, Index, InherentData,
SessionKey, Timestamp, UncheckedExtrinsic,
};
use substrate_primitives::{KeccakHasher, RlpCodec};
use substrate_primitives::{Blake2Hasher, RlpCodec};
/// Build new blocks.
pub trait BlockBuilder {
@@ -81,10 +81,10 @@ pub trait Api {
fn inherent_extrinsics(&self, at: &BlockId, inherent_data: InherentData) -> Result<Vec<UncheckedExtrinsic>>;
}
impl<B, E> BlockBuilder for ClientBlockBuilder<B, E, Block, KeccakHasher, RlpCodec>
impl<B, E> BlockBuilder for ClientBlockBuilder<B, E, Block, Blake2Hasher, RlpCodec>
where
B: Backend<Block, KeccakHasher, RlpCodec>,
E: CallExecutor<Block, KeccakHasher, RlpCodec>+ Clone,
B: Backend<Block, Blake2Hasher, RlpCodec>,
E: CallExecutor<Block, Blake2Hasher, RlpCodec>+ Clone,
{
fn push_extrinsic(&mut self, extrinsic: UncheckedExtrinsic) -> Result<()> {
self.push(extrinsic).map_err(Into::into)
@@ -98,10 +98,10 @@ where
impl<B, E> Api for Client<B, E, Block>
where
B: Backend<Block, KeccakHasher, RlpCodec>,
E: CallExecutor<Block, KeccakHasher, RlpCodec> + Clone,
B: Backend<Block, Blake2Hasher, RlpCodec>,
E: CallExecutor<Block, Blake2Hasher, RlpCodec> + Clone,
{
type BlockBuilder = ClientBlockBuilder<B, E, Block, KeccakHasher, RlpCodec>;
type BlockBuilder = ClientBlockBuilder<B, E, Block, Blake2Hasher, RlpCodec>;
fn session_keys(&self, at: &BlockId) -> Result<Vec<SessionKey>> {
Ok(self.authorities_at(at)?)