Chain-selection subsystem data revert (#5350)

* Chain-selection subsystem data revert

* Cargo fmt

* Better code comments

* Remove unwraps

* Document public method

* Remove duplicated 'ChainSelectionSubsystem' impl block

* Fix typos

* Nitpicks

* Revert returns a service Error

* Removed superflous error handling

* Apply suggestions from code review

* Rename tree 'revert' to 'revert_to'

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
This commit is contained in:
Davide Galassi
2022-04-28 17:44:14 +02:00
committed by GitHub
parent ac23b3f96c
commit bbdfc3d9c6
6 changed files with 243 additions and 45 deletions
+4 -2
View File
@@ -26,7 +26,7 @@ use polkadot_primitives::{
use sc_client_api::{AuxStore, Backend as BackendT, BlockchainEvents, KeyIterator, UsageProvider};
use sc_executor::NativeElseWasmExecutor;
use sp_api::{CallApiAt, Encode, NumberFor, ProvideRuntimeApi};
use sp_blockchain::HeaderBackend;
use sp_blockchain::{HeaderBackend, HeaderMetadata};
use sp_consensus::BlockStatus;
use sp_core::Pair;
use sp_keyring::Sr25519Keyring;
@@ -173,6 +173,7 @@ pub trait AbstractClient<Block, Backend>:
+ CallApiAt<Block, StateBackend = Backend::State>
+ AuxStore
+ UsageProvider<Block>
+ HeaderMetadata<Block, Error = sp_blockchain::Error>
where
Block: BlockT,
Backend: BackendT<Block>,
@@ -194,7 +195,8 @@ where
+ Sized
+ Send
+ Sync
+ CallApiAt<Block, StateBackend = Backend::State>,
+ CallApiAt<Block, StateBackend = Backend::State>
+ HeaderMetadata<Block, Error = sp_blockchain::Error>,
Client::Api: RuntimeApiCollection<StateBackend = Backend::State>,
{
}