Skip to content

Commit

Permalink
Make entities public to support Snap sync downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
shamil-gadelshin authored and nazar-pc committed Aug 12, 2024
1 parent d537512 commit de6a7e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions substrate/client/network/sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ pub use types::{SyncEvent, SyncEventStream, SyncState, SyncStatus, SyncStatusPro
mod block_announce_validator;
mod futures_stream;
mod justification_requests;
mod pending_responses;
pub mod pending_responses;
mod request_metrics;
mod schema;
pub mod schema;
pub mod types;

pub mod block_relay_protocol;
Expand Down
4 changes: 2 additions & 2 deletions substrate/client/network/sync/src/pending_responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ type ResponseResult = Result<Result<(Vec<u8>, ProtocolName), RequestFailure>, on
type ResponseFuture = BoxFuture<'static, ResponseResult>;

/// An event we receive once a pending response future resolves.
pub(crate) struct ResponseEvent<B: BlockT> {
pub struct ResponseEvent<B: BlockT> {
pub peer_id: PeerId,
pub key: StrategyKey,
pub request: PeerRequest<B>,
pub response: ResponseResult,
}

/// Stream taking care of polling pending responses.
pub(crate) struct PendingResponses<B: BlockT> {
pub struct PendingResponses<B: BlockT> {
/// Pending responses
pending_responses:
StreamMap<(PeerId, StrategyKey), BoxStream<'static, (PeerRequest<B>, ResponseResult)>>,
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/network/sync/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

//! Include sources generated from protobuf definitions.

pub(crate) mod v1 {
pub mod v1 {
include!(concat!(env!("OUT_DIR"), "/api.v1.rs"));
}
2 changes: 1 addition & 1 deletion substrate/client/network/sync/src/strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! and specific syncing algorithms.

pub mod chain_sync;
pub(crate) mod state;
pub mod state;
pub mod state_sync;
pub mod warp;

Expand Down

0 comments on commit de6a7e3

Please sign in to comment.