Skip to content

Commit

Permalink
remove function
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin-iancu committed Sep 26, 2024
1 parent 8a32702 commit 4b172d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion client-impls/local-host/src/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ pub trait ViewsModule:

let current_block = self.blockchain().get_block_nonce();
client_state::Data {
latest_height: height::Data::new(0, current_block),
latest_height: height::Data {
revision_number: 0,
revision_height: current_block,
},
}
}

Expand Down
17 changes: 9 additions & 8 deletions common/common-types/src/channel_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,6 @@ pub mod height {
}

impl Data {
#[inline]
pub fn new(revision_number: u64, revision_height: u64) -> Self {
Self {
revision_number,
revision_height,
}
}

pub fn is_zero(&self) -> bool {
self.revision_number == 0 && self.revision_height == 0
}
Expand All @@ -110,6 +102,15 @@ pub mod height {

use super::*;

impl Data {
fn new(revision_number: u64, revision_height: u64) -> Self {
Self {
revision_number,
revision_height,
}
}
}

#[test]
fn partial_ord_test() {
assert_eq!(
Expand Down

0 comments on commit 4b172d8

Please sign in to comment.