Ensure that all types appearing in public types are exported.

This commit is contained in:
Henry de Valence 2019-10-17 12:46:08 -07:00
parent 1f0a7e5e73
commit ad43a61fb4
3 changed files with 14 additions and 8 deletions

View File

@ -53,12 +53,18 @@ mod peer_set;
mod protocol;
mod timestamp_collector;
pub use config::Config;
pub use meta_addr::MetaAddr;
pub use network::Network;
pub use peer_set::{init, BoxedZebraService};
pub use protocol::internal::{Request, Response};
pub use timestamp_collector::TimestampCollector;
pub use crate::{
config::Config,
peer_set::{init, BoxedZebraService},
protocol::internal::{Request, Response},
// XXX replace with `AddressBook`
timestamp_collector::TimestampCollector,
};
/// Types used in the definition of [`Request`] and [`Response`] messages.
pub mod types {
pub use crate::{meta_addr::MetaAddr, network::Network, protocol::types::PeerServices};
}
/// This will be removed when we finish encapsulation
pub mod should_be_private {

View File

@ -19,7 +19,7 @@ use crate::{
constants,
protocol::{codec::*, internal::*, message::*, types::*},
timestamp_collector::{PeerLastSeen, TimestampCollector},
BoxedStdError, Config, Network,
BoxedStdError, Config, types::Network,
};
use super::{error::ErrorSlot, server::ServerState, HandshakeError, PeerClient, PeerServer};

View File

@ -17,7 +17,7 @@ use zebra_chain::{
types::{BlockHeight, Sha256dChecksum},
};
use crate::{constants, Network};
use crate::{constants, types::Network};
use super::{inv::InventoryHash, message::Message, types::*};