mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
fmt + deny
This commit is contained in:
@@ -142,10 +142,14 @@ fn featured_vectors() {
|
||||
}
|
||||
_ => panic!("Unknown network"),
|
||||
};
|
||||
let spend =
|
||||
CompressedEdwardsY::from_slice(&hex::decode(vector.spend).unwrap()).unwrap().decompress().unwrap();
|
||||
let view =
|
||||
CompressedEdwardsY::from_slice(&hex::decode(vector.view).unwrap()).unwrap().decompress().unwrap();
|
||||
let spend = CompressedEdwardsY::from_slice(&hex::decode(vector.spend).unwrap())
|
||||
.unwrap()
|
||||
.decompress()
|
||||
.unwrap();
|
||||
let view = CompressedEdwardsY::from_slice(&hex::decode(vector.view).unwrap())
|
||||
.unwrap()
|
||||
.decompress()
|
||||
.unwrap();
|
||||
|
||||
let addr = MoneroAddress::from_str(network, &vector.address).unwrap();
|
||||
assert_eq!(addr.spend, spend);
|
||||
|
||||
@@ -385,9 +385,8 @@ impl Scanner {
|
||||
}
|
||||
|
||||
// P - shared == spend
|
||||
let subaddress = self
|
||||
.subaddresses
|
||||
.get(&(output_key - (&shared_key * ED25519_BASEPOINT_TABLE)).compress());
|
||||
let subaddress =
|
||||
self.subaddresses.get(&(output_key - (&shared_key * ED25519_BASEPOINT_TABLE)).compress());
|
||||
if subaddress.is_none() {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,8 @@ impl ClassicSeed {
|
||||
}
|
||||
|
||||
pub fn from_entropy(lang: Language, entropy: Zeroizing<[u8; 32]>) -> Option<ClassicSeed> {
|
||||
Option::from(Scalar::from_canonical_bytes(*entropy)).map(|scalar| key_to_seed(lang, Zeroizing::new(scalar)))
|
||||
Option::from(Scalar::from_canonical_bytes(*entropy))
|
||||
.map(|scalar| key_to_seed(lang, Zeroizing::new(scalar)))
|
||||
}
|
||||
|
||||
pub(crate) fn to_string(&self) -> Zeroizing<String> {
|
||||
|
||||
Reference in New Issue
Block a user