mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-11-16 15:58:17 +00:00
Remove CryptoNight V3
there is no v3 monero goes straight from v2 -> v4 I can only guess this is because of the way monero calculates what variant to use:
5900ed3706/src/cryptonote_core/cryptonote_tx_utils.cpp (L702)
This commit is contained in:
parent
b4711c7118
commit
b243ff0021
1 changed files with 3 additions and 5 deletions
|
@ -15,15 +15,14 @@ pub enum Variant {
|
|||
V0,
|
||||
V1,
|
||||
V2,
|
||||
V3,
|
||||
V4 { height: u64 },
|
||||
R { height: u64 },
|
||||
}
|
||||
|
||||
impl Variant {
|
||||
/// Returns the height of the block we are hashing, if thats relevant for this variant otherwise
|
||||
/// `0` is returned.
|
||||
fn height(&self) -> u64 {
|
||||
if let Variant::V4 { height } = self {
|
||||
if let Variant::R { height } = self {
|
||||
*height
|
||||
} else {
|
||||
0
|
||||
|
@ -35,8 +34,7 @@ impl Variant {
|
|||
Variant::V0 => 0,
|
||||
Variant::V1 => 1,
|
||||
Variant::V2 => 2,
|
||||
Variant::V3 => 3,
|
||||
Variant::V4 { .. } => 4,
|
||||
Variant::R { .. } => 4,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue