mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 12:09:37 +00:00
Support custom Monero protocol definitions
This commit is contained in:
parent
6f9cf510da
commit
6acbfdcc45
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,7 @@ pub enum Protocol {
|
||||||
Unsupported,
|
Unsupported,
|
||||||
v14,
|
v14,
|
||||||
v16,
|
v16,
|
||||||
|
Custom { ring_len: usize, bp_plus: bool },
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Protocol {
|
impl Protocol {
|
||||||
|
@ -68,6 +69,7 @@ impl Protocol {
|
||||||
Protocol::Unsupported => panic!("Unsupported protocol version"),
|
Protocol::Unsupported => panic!("Unsupported protocol version"),
|
||||||
Protocol::v14 => 11,
|
Protocol::v14 => 11,
|
||||||
Protocol::v16 => 16,
|
Protocol::v16 => 16,
|
||||||
|
Protocol::Custom { ring_len, .. } => *ring_len,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +80,7 @@ impl Protocol {
|
||||||
Protocol::Unsupported => panic!("Unsupported protocol version"),
|
Protocol::Unsupported => panic!("Unsupported protocol version"),
|
||||||
Protocol::v14 => false,
|
Protocol::v14 => false,
|
||||||
Protocol::v16 => true,
|
Protocol::v16 => true,
|
||||||
|
Protocol::Custom { bp_plus, .. } => *bp_plus,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue