Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into A0-1794-sync-forest
  • Loading branch information
timorl committed Jan 23, 2023
commit 4b2a8948e422d427666a508e233119e3fd042593
8 changes: 5 additions & 3 deletions finality-aleph/src/sync/mock.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use codec::{Decode, Encode};

use crate::sync::{BlockIdentifier, Header, Justification};

pub type MockPeerId = u32;

#[derive(Clone, Hash, Debug, PartialEq, Eq)]
#[derive(Clone, Hash, Debug, PartialEq, Eq, Encode, Decode)]
pub struct MockIdentifier {
number: u32,
hash: u32,
Expand All @@ -24,7 +26,7 @@ impl BlockIdentifier for MockIdentifier {
}
}

#[derive(Clone, Hash, Debug, PartialEq, Eq)]
#[derive(Clone, Hash, Debug, PartialEq, Eq, Encode, Decode)]
pub struct MockHeader {
id: MockIdentifier,
parent: Option<MockIdentifier>,
Expand Down Expand Up @@ -79,7 +81,7 @@ impl Header for MockHeader {
}
}

#[derive(Clone, Hash, Debug, PartialEq, Eq)]
#[derive(Clone, Hash, Debug, PartialEq, Eq, Encode, Decode)]
pub struct MockJustification {
header: MockHeader,
}
Expand Down
3 changes: 3 additions & 0 deletions finality-aleph/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ use std::{
hash::Hash,
};

use codec::Codec;

mod data;
mod forest;
#[cfg(test)]
mod mock;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.