Manually step the Tendermint machine when we synced a block over the network

This commit is contained in:
Luke Parker
2022-11-13 20:26:01 -05:00
parent 138866f64d
commit 8c51bc011d
2 changed files with 71 additions and 32 deletions

View File

@@ -7,7 +7,7 @@ use sp_blockchain::HeaderBackend;
use sp_api::{StateBackend, StateBackendFor, TransactionFor, ApiExt, ProvideRuntimeApi};
use sp_consensus::{Error, Environment};
use sc_client_api::{BlockBackend, Backend, Finalizer};
use sc_client_api::{BlockBackend, Backend, Finalizer, BlockchainEvents};
use sc_block_builder::BlockBuilderApi;
use sc_consensus::{BlockImport, BasicQueue};
@@ -81,6 +81,7 @@ pub trait TendermintClient: Send + Sync + 'static {
+ BlockBackend<Self::Block>
+ BlockImport<Self::Block, Transaction = Self::BackendTransaction>
+ Finalizer<Self::Block, Self::Backend>
+ BlockchainEvents<Self::Block>
+ ProvideRuntimeApi<Self::Block, Api = Self::Api>
+ 'static;
}
@@ -100,6 +101,7 @@ pub trait TendermintClientMinimal: Send + Sync + 'static {
+ BlockBackend<Self::Block>
+ BlockImport<Self::Block, Transaction = TransactionFor<Self::Client, Self::Block>>
+ Finalizer<Self::Block, Self::Backend>
+ BlockchainEvents<Self::Block>
+ ProvideRuntimeApi<Self::Block, Api = Self::Api>
+ 'static;
}