mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 16:07:57 +00:00
Allow import withouth state verification (#4031)
* Allow import without state verification * Explicit None Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
committed by
Gavin Wood
parent
021f3a3f06
commit
cca9ab436c
@@ -77,6 +77,7 @@ impl<B, E, RA, Block> ClientExt<Block> for Client<B, E, Block, RA>
|
||||
finalized: false,
|
||||
auxiliary: Vec::new(),
|
||||
fork_choice: ForkChoiceStrategy::LongestChain,
|
||||
allow_missing_state: false,
|
||||
};
|
||||
|
||||
BlockImport::import_block(&mut (&*self), import, HashMap::new()).map(|_| ())
|
||||
@@ -95,6 +96,7 @@ impl<B, E, RA, Block> ClientExt<Block> for Client<B, E, Block, RA>
|
||||
finalized: false,
|
||||
auxiliary: Vec::new(),
|
||||
fork_choice: ForkChoiceStrategy::Custom(true),
|
||||
allow_missing_state: false,
|
||||
};
|
||||
|
||||
BlockImport::import_block(&mut (&*self), import, HashMap::new()).map(|_| ())
|
||||
@@ -116,6 +118,7 @@ impl<B, E, RA, Block> ClientExt<Block> for Client<B, E, Block, RA>
|
||||
finalized: true,
|
||||
auxiliary: Vec::new(),
|
||||
fork_choice: ForkChoiceStrategy::LongestChain,
|
||||
allow_missing_state: false,
|
||||
};
|
||||
|
||||
BlockImport::import_block(&mut (&*self), import, HashMap::new()).map(|_| ())
|
||||
|
||||
@@ -98,6 +98,12 @@ impl<Block, Executor, G: GenesisInit> TestClientBuilder<
|
||||
pub fn backend(&self) -> Arc<Backend<Block>> {
|
||||
self.backend.clone()
|
||||
}
|
||||
|
||||
/// Create new `TestClientBuilder` with default backend and pruning window size
|
||||
pub fn with_pruning_window(keep_blocks: u32) -> Self {
|
||||
let backend = Arc::new(Backend::new_test(keep_blocks, 0));
|
||||
Self::with_backend(backend)
|
||||
}
|
||||
}
|
||||
|
||||
impl<Executor, Backend, G: GenesisInit> TestClientBuilder<Executor, Backend, G> {
|
||||
|
||||
Reference in New Issue
Block a user