Fix warnings (#3240)

This commit is contained in:
jaspervdm 2020-02-25 18:33:50 +01:00 committed by GitHub
parent bcf3e4e4e4
commit 6bdeefd27e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 16 deletions

View file

@ -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)
}

View file

@ -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 {