move request_builder -> request::builder

This commit is contained in:
Robert Habermeier 2017-03-08 20:11:22 +01:00
parent aea9b1d6cc
commit 8fb0a2d417
6 changed files with 9 additions and 7 deletions

View File

@ -38,7 +38,6 @@ pub mod net;
//pub mod on_demand; //pub mod on_demand;
pub mod transaction_queue; pub mod transaction_queue;
pub mod cache; pub mod cache;
pub mod request_builder;
#[cfg(not(feature = "ipc"))] #[cfg(not(feature = "ipc"))]
pub mod provider; pub mod provider;

View File

@ -20,7 +20,7 @@ use network::{NetworkContext, PeerId, NodeId};
use super::{Announcement, LightProtocol, ReqId}; use super::{Announcement, LightProtocol, ReqId};
use super::error::Error; use super::error::Error;
use request_builder::Requests; use request::Requests;
/// An I/O context which allows sending and receiving packets as well as /// An I/O context which allows sending and receiving packets as well as
/// disconnecting peers. This is used as a generalization of the portions /// disconnecting peers. This is used as a generalization of the portions

View File

@ -33,8 +33,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
use provider::Provider; use provider::Provider;
use request::{Request, Response}; use request::{Request, Requests, Response};
use request_builder::Requests;
use self::request_credits::{Credits, FlowParams}; use self::request_credits::{Credits, FlowParams};
use self::context::{Ctx, TickCtx}; use self::context::{Ctx, TickCtx};
@ -665,7 +664,7 @@ impl LightProtocol {
// the maximum amount of requests we'll fill in a single packet. // the maximum amount of requests we'll fill in a single packet.
const MAX_REQUESTS: usize = 256; const MAX_REQUESTS: usize = 256;
use ::request_builder::RequestBuilder; use ::request::RequestBuilder;
use ::request::CompleteRequest; use ::request::CompleteRequest;
let peers = self.peers.read(); let peers = self.peers.read();

View File

@ -25,7 +25,7 @@ use std::collections::{BTreeMap, HashMap};
use std::iter::FromIterator; use std::iter::FromIterator;
use request::Request; use request::Request;
use request_builder::Requests; use request::Requests;
use net::{timeout, ReqId}; use net::{timeout, ReqId};
use time::{Duration, SteadyTime}; use time::{Duration, SteadyTime};
@ -130,7 +130,7 @@ fn compute_timeout(reqs: &Requests) -> Duration {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use net::ReqId; use net::ReqId;
use request_builder::RequestBuilder; use request::RequestBuilder;
use time::{SteadyTime, Duration}; use time::{SteadyTime, Duration};
use super::{RequestSet, compute_timeout}; use super::{RequestSet, compute_timeout};

View File

@ -19,6 +19,8 @@
use rlp::{Encodable, Decodable, Decoder, DecoderError, RlpStream, Stream, View}; use rlp::{Encodable, Decodable, Decoder, DecoderError, RlpStream, Stream, View};
use util::H256; use util::H256;
mod builder;
// re-exports of request types. // re-exports of request types.
pub use self::header::{ pub use self::header::{
Complete as CompleteHeadersRequest, Complete as CompleteHeadersRequest,
@ -61,6 +63,8 @@ pub use self::execution::{
Response as ExecutionResponse, Response as ExecutionResponse,
}; };
pub use self::builder::{RequestBuilder, Requests};
/// Error indicating a reference to a non-existent or wrongly-typed output. /// Error indicating a reference to a non-existent or wrongly-typed output.
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct NoSuchOutput; pub struct NoSuchOutput;