diff --git a/ethcore/sync/src/chain/supplier.rs b/ethcore/sync/src/chain/supplier.rs index 920027581..4c6092cd2 100644 --- a/ethcore/sync/src/chain/supplier.rs +++ b/ethcore/sync/src/chain/supplier.rs @@ -15,7 +15,12 @@ // along with OpenEthereum. If not, see . use bytes::Bytes; + +#[cfg(not(test))] use devp2p::PAYLOAD_SOFT_LIMIT; +#[cfg(test)] +pub const PAYLOAD_SOFT_LIMIT: usize = 100_000; + use enum_primitive::FromPrimitive; use ethereum_types::H256; use network::{self, PeerId}; diff --git a/util/network-devp2p/src/connection.rs b/util/network-devp2p/src/connection.rs index 548652278..40dbd0487 100644 --- a/util/network-devp2p/src/connection.rs +++ b/util/network-devp2p/src/connection.rs @@ -44,10 +44,7 @@ pub const MAX_PAYLOAD_SIZE: usize = (1 << 24) - 1; /// Network responses should try not to go over this limit. /// This should be lower than MAX_PAYLOAD_SIZE -#[cfg(not(test))] pub const PAYLOAD_SOFT_LIMIT: usize = (1 << 22) - 1; -#[cfg(test)] -pub const PAYLOAD_SOFT_LIMIT: usize = 100_000; pub trait GenericSocket: Read + Write {}