Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
stiegerc committed Nov 15, 2024
1 parent 3bb593f commit 77cd890
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
19 changes: 5 additions & 14 deletions rs/canonical_state/src/encoding/tests/compatibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,7 @@ fn canonical_encoding_request() {
payment: Cycles::new(4),
method_name: "test".to_string(),
method_payload: vec![6],
metadata: Some(RequestMetadata::new(
13,
Time::from_nanos_since_unix_epoch(101),
)),
metadata: RequestMetadata::new(13, Time::from_nanos_since_unix_epoch(101)),
deadline: NO_DEADLINE,
}
.into();
Expand Down Expand Up @@ -519,10 +516,7 @@ fn canonical_encoding_request_v18_plus() {
payment: Cycles::new(4),
method_name: "test".to_string(),
method_payload: vec![6],
metadata: Some(RequestMetadata::new(
13,
Time::from_nanos_since_unix_epoch(101),
)),
metadata: RequestMetadata::new(13, Time::from_nanos_since_unix_epoch(101)),
deadline: CoarseTime::from_secs_since_unix_epoch(8),
}
.into();
Expand Down Expand Up @@ -591,7 +585,7 @@ fn canonical_encoding_request_with_u128_cycles() {
payment: Cycles::new(123456789012345678901234567890),
method_name: "test".to_string(),
method_payload: vec![6],
metadata: None,
metadata: Default::default(),
deadline: NO_DEADLINE,
}
.into();
Expand Down Expand Up @@ -1511,11 +1505,8 @@ fn reject_context() -> RejectContext {
RejectContext::new(RejectCode::SysFatal, "Oops")
}

fn request_metadata() -> Option<RequestMetadata> {
Some(RequestMetadata::new(
13,
Time::from_nanos_since_unix_epoch(101),
))
fn request_metadata() -> RequestMetadata {
RequestMetadata::new(13, Time::from_nanos_since_unix_epoch(101))
}

fn deadline(certification_version: CertificationVersion) -> CoarseTime {
Expand Down
5 changes: 1 addition & 4 deletions rs/canonical_state/src/encoding/tests/test_fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ pub fn stream_header(certification_version: CertificationVersion) -> StreamHeade
}

pub fn request(certification_version: CertificationVersion) -> RequestOrResponse {
let metadata = Some(RequestMetadata::new(
1,
Time::from_nanos_since_unix_epoch(100_000),
));
let metadata = RequestMetadata::new(1, Time::from_nanos_since_unix_epoch(100_000));
let deadline = if certification_version >= CertificationVersion::V18 {
CoarseTime::from_secs_since_unix_epoch(8)
} else {
Expand Down

0 comments on commit 77cd890

Please sign in to comment.