mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Fix warnings (#3240)
This commit is contained in:
parent
bcf3e4e4e4
commit
6bdeefd27e
2 changed files with 6 additions and 16 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue