Skip to content

Commit cd35b04

Browse files
committed
fix protocol check, incr req-res timeout
1 parent ee968df commit cd35b04

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

p2p/src/behaviour.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn create_request_response_behaviour(
2929
) -> request_response::cbor::Behaviour<Vec<u8>, Vec<u8>> {
3030
use request_response::{Behaviour, Config, ProtocolSupport};
3131

32-
const REQUEST_RESPONSE_TIMEOUT: Duration = Duration::from_secs(180);
32+
const REQUEST_RESPONSE_TIMEOUT: Duration = Duration::from_secs(512);
3333

3434
Behaviour::new(
3535
[(protocol_name, ProtocolSupport::Full)],

utils/src/message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ pub enum DriaMessageError {
3333
DecodeError(base64::DecodeError),
3434
#[error("Could not parse message: {0}")]
3535
ParseError(serde_json::Error),
36-
#[error("Invalid header (expected {expected:?}, got {found:?})")]
36+
#[error("Protocol mismatch (expected {expected:?}, got {found:?})")]
3737
ProtocolMismatch { expected: String, found: String },
38-
#[error("Invalid header (expected {expected:?}, got {found:?})")]
38+
#[error("Version mismatch (expected {expected:?}, got {found:?})")]
3939
VersionMismatch {
4040
expected: SemanticVersion,
4141
found: SemanticVersion,

utils/src/version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ impl SemanticVersion {
3636
/// Checks if the current version is compatible with the given version.
3737
/// Compatibility is defined as:
3838
/// - Major and minor versions must match exactly.
39-
/// - Patch version must be greater than or equal to the given version.
39+
/// - Patch versions dont have to match.
4040
pub fn is_compatible(&self, other: &Self) -> bool {
41-
self.major == other.major && self.minor == other.minor && self.patch >= other.patch
41+
self.major == other.major && self.minor == other.minor
4242
}
4343

4444
pub fn with_major(mut self, major: u32) -> Self {

0 commit comments

Comments
 (0)