mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
Add a LightSyncState field to the chain spec (#6894)
* Reset code, almost ready for PR * Improved build_hardcoded_spec * Fix line widths * Fix tests * Fix sc-service-test * Suggestions from code review * Rename to LightSyncState * It's not syncing :^( * It syncs! * Remove rpc call * Convert spaces to tabs * Moved sc-service things to export_sync_state.rs * Fix tests * Wait for syncing with network_status_sinks * Remove sc-network from node-template * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Various changes, split the flag up into 2 pieces to make testing easier. * Update client/cli/src/commands/build_spec_cmd.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Revert a lot of changes Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ use sc_executor::{NativeExecutor, WasmExecutionMethod, RuntimeVersion, NativeVer
|
||||
use sp_core::{H256, NativeOrEncoded, testing::TaskExecutor};
|
||||
use sc_client_api::{
|
||||
blockchain::Info, backend::NewBlockState, Backend as ClientBackend, ProofProvider,
|
||||
in_mem::{Backend as InMemBackend, Blockchain as InMemoryBlockchain},
|
||||
in_mem::{Backend as InMemBackend, Blockchain as InMemoryBlockchain}, ChtRootStorage,
|
||||
AuxStore, Storage, CallExecutor, cht, ExecutionStrategy, StorageProof, BlockImportOperation,
|
||||
RemoteCallRequest, StorageProvider, ChangesProof, RemoteBodyRequest, RemoteReadRequest,
|
||||
RemoteChangesRequest, FetchChecker, RemoteReadChildRequest, RemoteHeaderRequest, BlockBackend,
|
||||
@@ -164,6 +164,16 @@ impl Storage<Block> for DummyStorage {
|
||||
Err(ClientError::Backend("Test error".into()))
|
||||
}
|
||||
|
||||
fn cache(&self) -> Option<Arc<dyn BlockchainCache<Block>>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn usage_info(&self) -> Option<sc_client_api::UsageInfo> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl ChtRootStorage<Block> for DummyStorage {
|
||||
fn header_cht_root(&self, _cht_size: u64, _block: u64) -> ClientResult<Option<Hash>> {
|
||||
Err(ClientError::Backend("Test error".into()))
|
||||
}
|
||||
@@ -177,14 +187,6 @@ impl Storage<Block> for DummyStorage {
|
||||
).into())
|
||||
.map(Some)
|
||||
}
|
||||
|
||||
fn cache(&self) -> Option<Arc<dyn BlockchainCache<Block>>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn usage_info(&self) -> Option<sc_client_api::UsageInfo> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
struct DummyCallExecutor;
|
||||
|
||||
Reference in New Issue
Block a user