Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
fix updater
Browse files Browse the repository at this point in the history
  • Loading branch information
NikVolf committed Dec 20, 2016
1 parent 4ddd2ce commit 29c1fee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ipc-common-types/src/types/release_track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::fmt;

/// A release's track.
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
#[derive(binary)]
#[binary]
pub enum ReleaseTrack {
/// Stable track.
Stable,
Expand Down
2 changes: 1 addition & 1 deletion ipc-common-types/src/types/version_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use release_track::ReleaseTrack;

/// Version information of a particular release.
#[derive(Debug, Clone, PartialEq)]
#[derive(binary)]
#[binary]
pub struct VersionInfo {
/// The track on which it was released.
pub track: ReleaseTrack,
Expand Down
21 changes: 12 additions & 9 deletions updater/src/types/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,46 @@ use util::{H256};
pub use ipc_common_types::{VersionInfo, ReleaseTrack};

/// Information regarding a particular release of Parity
#[derive(Debug, Clone, PartialEq, Binary)]
#[derive(Debug, Clone, PartialEq)]
#[binary]
pub struct ReleaseInfo {
/// Information on the version.
pub version: VersionInfo,
/// Does this release contain critical security updates?
/// Does this release contain critical security updates?
pub is_critical: bool,
/// The latest fork that this release can handle.
pub fork: u64,
/// Our platform's binary, if known.
/// Our platform's binary, if known.
pub binary: Option<H256>,
}

/// Information on our operations environment.
#[derive(Debug, Clone, PartialEq, Binary)]
#[derive(Debug, Clone, PartialEq)]
#[binary]
pub struct OperationsInfo {
/// Our blockchain's latest fork.
pub fork: u64,

/// Last fork our client supports, if known.
/// Last fork our client supports, if known.
pub this_fork: Option<u64>,

/// Information on our track's latest release.
/// Information on our track's latest release.
pub track: ReleaseInfo,
/// Information on our minor version's latest release.
pub minor: Option<ReleaseInfo>,
}

/// Information on the current version's consensus capabililty.
#[derive(Debug, Clone, Copy, PartialEq, Binary)]
#[derive(Debug, Clone, Copy, PartialEq)]
#[binary]
pub enum CapState {
/// Unknown.
Unknown,
/// Capable of consensus indefinitely.
Capable,
/// Capable of consensus up until a definite block.
/// Capable of consensus up until a definite block.
CapableUntil(u64),
/// Incapable of consensus since a particular block.
/// Incapable of consensus since a particular block.
IncapableSince(u64),
}

Expand Down

0 comments on commit 29c1fee

Please sign in to comment.