mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
Make light client backend only work with locally available data (#3538)
* removing fetcher dependency from light backend * fix compilation
This commit is contained in:
committed by
Gavin Wood
parent
fd924c07ed
commit
634ca73e50
@@ -237,9 +237,8 @@ pub fn new_light<C: Send + Default + 'static>(config: Configuration<C, GenesisCo
|
||||
.with_transaction_pool(|config, client|
|
||||
Ok(TransactionPool::new(config, transaction_pool::ChainApi::new(client)))
|
||||
)?
|
||||
.with_import_queue_and_fprb(|_config, client, backend, _select_chain, transaction_pool| {
|
||||
let fetch_checker = backend.blockchain().fetcher()
|
||||
.upgrade()
|
||||
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, transaction_pool| {
|
||||
let fetch_checker = fetcher
|
||||
.map(|fetcher| fetcher.checker().clone())
|
||||
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
|
||||
let block_import = grandpa::light_block_import::<_, _, _, RuntimeApi, _>(
|
||||
|
||||
Reference in New Issue
Block a user