This commit is contained in:
draganrakita 2020-12-17 20:48:45 +01:00 committed by rakita
parent 8d3e0582a8
commit eab41b49cf
2 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,12 @@
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>. // along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use bytes::Bytes; use bytes::Bytes;
#[cfg(not(test))]
use devp2p::PAYLOAD_SOFT_LIMIT; use devp2p::PAYLOAD_SOFT_LIMIT;
#[cfg(test)]
pub const PAYLOAD_SOFT_LIMIT: usize = 100_000;
use enum_primitive::FromPrimitive; use enum_primitive::FromPrimitive;
use ethereum_types::H256; use ethereum_types::H256;
use network::{self, PeerId}; use network::{self, PeerId};

View File

@ -44,10 +44,7 @@ pub const MAX_PAYLOAD_SIZE: usize = (1 << 24) - 1;
/// Network responses should try not to go over this limit. /// Network responses should try not to go over this limit.
/// This should be lower than MAX_PAYLOAD_SIZE /// This should be lower than MAX_PAYLOAD_SIZE
#[cfg(not(test))]
pub const PAYLOAD_SOFT_LIMIT: usize = (1 << 22) - 1; pub const PAYLOAD_SOFT_LIMIT: usize = (1 << 22) - 1;
#[cfg(test)]
pub const PAYLOAD_SOFT_LIMIT: usize = 100_000;
pub trait GenericSocket: Read + Write {} pub trait GenericSocket: Read + Write {}