cargo fmt

This commit is contained in:
Jack Grigg 2021-04-16 14:03:55 +12:00
parent dc0f6e7115
commit 28a45028ab
2 changed files with 11 additions and 3 deletions

View File

@ -428,7 +428,13 @@ pub fn try_compact_note_decryption<D: Domain, Output: ShieldedOutput<D>>(
plaintext.copy_from_slice(output.enc_ciphertext());
ChaCha20Ietf::xor(key.as_ref(), &[0u8; 12], 1, &mut plaintext);
parse_note_plaintext_without_memo_ivk(domain, ivk, output.epk(), &output.cmstar_bytes(), &plaintext)
parse_note_plaintext_without_memo_ivk(
domain,
ivk,
output.epk(),
&output.cmstar_bytes(),
&plaintext,
)
}
/// Recovery of the full note plaintext by the sender.
@ -484,7 +490,9 @@ pub fn try_output_recovery_with_ock<D: Domain, Output: ShieldedOutput<D>>(
domain.parse_note_plaintext_without_memo_ovk(&pk_d, &esk, output.epk(), &plaintext)?;
let memo = domain.extract_memo(&plaintext);
if let NoteValidity::Valid = check_note_validity::<D>(&note, output.epk(), &output.cmstar_bytes()) {
if let NoteValidity::Valid =
check_note_validity::<D>(&note, output.epk(), &output.cmstar_bytes())
{
Some((note, to, memo))
} else {
None

View File

@ -118,7 +118,7 @@ pub struct SaplingDomain<P: consensus::Parameters> {
impl<P: consensus::Parameters> Domain for SaplingDomain<P> {
type EphemeralSecretKey = jubjub::Scalar;
// It is acceptable for this to be a point because we enforce by consensus that
// It is acceptable for this to be a point because we enforce by consensus that
// points must not be small-order, and all points with non-canonical serialization
// are small-order.
type EphemeralPublicKey = jubjub::ExtendedPoint;