Use `{ENC,OUT}_CIPHERTEXT_SIZE` constants in `zcash_primitives::transaction::components::sapling`.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
e5bdc72b52
commit
e32cf8b5ac
|
@ -3,7 +3,7 @@ use ff::PrimeField;
|
|||
use std::io::{self, Read, Write};
|
||||
|
||||
use zcash_encoding::{Array, CompactSize, Vector};
|
||||
use zcash_note_encryption::EphemeralKeyBytes;
|
||||
use zcash_note_encryption::{EphemeralKeyBytes, ENC_CIPHERTEXT_SIZE, OUT_CIPHERTEXT_SIZE};
|
||||
|
||||
use crate::{
|
||||
sapling::{
|
||||
|
@ -172,8 +172,8 @@ fn read_output_v4<R: Read>(mut reader: &mut R) -> io::Result<OutputDescription<G
|
|||
let mut ephemeral_key = EphemeralKeyBytes([0u8; 32]);
|
||||
reader.read_exact(&mut ephemeral_key.0)?;
|
||||
|
||||
let mut enc_ciphertext = [0u8; 580];
|
||||
let mut out_ciphertext = [0u8; 80];
|
||||
let mut enc_ciphertext = [0u8; ENC_CIPHERTEXT_SIZE];
|
||||
let mut out_ciphertext = [0u8; OUT_CIPHERTEXT_SIZE];
|
||||
reader.read_exact(&mut enc_ciphertext)?;
|
||||
reader.read_exact(&mut out_ciphertext)?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue