mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Get rid of polling in WarpSync (#1265)
This commit is contained in:
@@ -15,10 +15,9 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
use futures::channel::oneshot;
|
||||
pub use sp_consensus_grandpa::{AuthorityList, SetId};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use std::{fmt, sync::Arc};
|
||||
use std::fmt;
|
||||
|
||||
/// Scale-encoded warp sync proof response.
|
||||
pub struct EncodedProof(pub Vec<u8>);
|
||||
@@ -30,16 +29,6 @@ pub struct WarpProofRequest<B: BlockT> {
|
||||
pub begin: B::Hash,
|
||||
}
|
||||
|
||||
/// The different types of warp syncing.
|
||||
pub enum WarpSyncParams<Block: BlockT> {
|
||||
/// Standard warp sync for the chain.
|
||||
WithProvider(Arc<dyn WarpSyncProvider<Block>>),
|
||||
/// Skip downloading proofs and wait for a header of the state that should be downloaded.
|
||||
///
|
||||
/// It is expected that the header provider ensures that the header is trusted.
|
||||
WaitForTarget(oneshot::Receiver<<Block as BlockT>::Header>),
|
||||
}
|
||||
|
||||
/// Proof verification result.
|
||||
pub enum VerificationResult<Block: BlockT> {
|
||||
/// Proof is valid, but the target was not reached.
|
||||
|
||||
Reference in New Issue
Block a user