Orchard: tidy
This commit is contained in:
parent
d3f0b226e6
commit
e85359c756
|
@ -143,6 +143,12 @@ impl From<[u8; 32]> for SpendingKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<SpendingKey> for [u8; 32] {
|
||||||
|
fn from(sk: SpendingKey) -> Self {
|
||||||
|
sk.bytes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl fmt::Display for SpendingKey {
|
impl fmt::Display for SpendingKey {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let hrp = match self.network {
|
let hrp = match self.network {
|
||||||
|
|
|
@ -87,7 +87,7 @@ pub fn sinsemilla_hash_to_point(D: &[u8], M: &BitVec<Lsb0, u8>) -> pallas::Point
|
||||||
.for_each(|(i, bit)| bits.set(i, *bit));
|
.for_each(|(i, bit)| bits.set(i, *bit));
|
||||||
|
|
||||||
// An instance of LEBS2IP_k
|
// An instance of LEBS2IP_k
|
||||||
let j = &bits.iter().fold(0u16, |j, &bit| j * *2 + bit as u16);
|
let j = &bits.iter().fold(0u16, |j, &bit| j * 2 + bit as u16);
|
||||||
|
|
||||||
acc += acc + S(j.to_le_bytes());
|
acc += acc + S(j.to_le_bytes());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue