mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Switch to shiny new fast, RLP-less trie (#795)
* Bump codec * Fix tests * Patricia trie builds * Introduce trie * Some yak shaving. * Some fixes * Remove RLP ref * Fixes * It builds! * Some tests fixed * Another test fix * Rejig more hashes * substrate-trie::iterator_works test * Update lock * Polish * Docs * Undo incorrect "fix" for tests * Fix nits
This commit is contained in:
committed by
Arkadiy Paronyan
parent
b02c274374
commit
82d6ca3484
@@ -34,7 +34,7 @@ use primitives::{
|
||||
AccountId, Block, BlockId, BlockNumber, Hash, Index, InherentData, SessionKey, Timestamp, UncheckedExtrinsic
|
||||
};
|
||||
use sr_primitives::{transaction_validity::TransactionValidity, traits::{CurrentHeight, BlockNumberToHash}};
|
||||
use substrate_primitives::{Blake2Hasher, RlpCodec};
|
||||
use substrate_primitives::{Blake2Hasher};
|
||||
|
||||
/// Build new blocks.
|
||||
pub trait BlockBuilder {
|
||||
@@ -87,10 +87,10 @@ pub trait Api: CurrentHeight<BlockNumber=BlockNumber> + BlockNumberToHash<BlockN
|
||||
fn inherent_extrinsics(&self, at: &BlockId, inherent_data: InherentData) -> Result<Vec<UncheckedExtrinsic>>;
|
||||
}
|
||||
|
||||
impl<B, E> BlockBuilder for ClientBlockBuilder<B, E, Block, Blake2Hasher, RlpCodec>
|
||||
impl<B, E> BlockBuilder for ClientBlockBuilder<B, E, Block, Blake2Hasher>
|
||||
where
|
||||
B: Backend<Block, Blake2Hasher, RlpCodec>,
|
||||
E: CallExecutor<Block, Blake2Hasher, RlpCodec> + Clone,
|
||||
B: Backend<Block, Blake2Hasher>,
|
||||
E: CallExecutor<Block, Blake2Hasher> + Clone,
|
||||
{
|
||||
fn push_extrinsic(&mut self, extrinsic: UncheckedExtrinsic) -> Result<()> {
|
||||
self.push(extrinsic).map_err(Into::into)
|
||||
@@ -104,10 +104,10 @@ where
|
||||
|
||||
impl<B, E> Api for Client<B, E, Block>
|
||||
where
|
||||
B: Backend<Block, Blake2Hasher, RlpCodec>,
|
||||
E: CallExecutor<Block, Blake2Hasher, RlpCodec> + Clone,
|
||||
B: Backend<Block, Blake2Hasher>,
|
||||
E: CallExecutor<Block, Blake2Hasher> + Clone,
|
||||
{
|
||||
type BlockBuilder = ClientBlockBuilder<B, E, Block, Blake2Hasher, RlpCodec>;
|
||||
type BlockBuilder = ClientBlockBuilder<B, E, Block, Blake2Hasher>;
|
||||
|
||||
fn session_keys(&self, at: &BlockId) -> Result<Vec<SessionKey>> {
|
||||
Ok(self.authorities_at(at)?)
|
||||
|
||||
Reference in New Issue
Block a user