Skip to content

Commit

Permalink
Fix warnings (#3240)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervdm authored Feb 25, 2020
1 parent bcf3e4e commit 6bdeefd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
12 changes: 6 additions & 6 deletions core/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,22 @@ pub fn header_version(height: u64) -> HeaderVersion {
global::ChainTypes::Mainnet => HeaderVersion(hf_interval),
global::ChainTypes::Floonet => {
if height < FLOONET_FIRST_HARD_FORK {
(HeaderVersion(1))
HeaderVersion(1)
} else if height < FLOONET_SECOND_HARD_FORK {
(HeaderVersion(2))
HeaderVersion(2)
} else if height < 3 * HARD_FORK_INTERVAL {
(HeaderVersion(3))
HeaderVersion(3)
} else {
HeaderVersion(hf_interval)
}
}
global::ChainTypes::AutomatedTesting | global::ChainTypes::UserTesting => {
if height < TESTING_FIRST_HARD_FORK {
(HeaderVersion(1))
HeaderVersion(1)
} else if height < TESTING_SECOND_HARD_FORK {
(HeaderVersion(2))
HeaderVersion(2)
} else if height < 3 * HARD_FORK_INTERVAL {
(HeaderVersion(3))
HeaderVersion(3)
} else {
HeaderVersion(hf_interval)
}
Expand Down
10 changes: 0 additions & 10 deletions keychain/src/extkey_bip32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,16 +333,6 @@ impl error::Error for Error {
None
}
}

fn description(&self) -> &str {
match *self {
Error::CannotDeriveFromHardenedKey => "cannot derive hardened key from public key",
Error::Ecdsa(ref e) => error::Error::description(e),
Error::InvalidChildNumber(_) => "child number is invalid",
Error::RngError(_) => "rng error",
Error::MnemonicError(_) => "mnemonic error",
}
}
}

impl From<secp::Error> for Error {
Expand Down

0 comments on commit 6bdeefd

Please sign in to comment.