Use Vec<u8> for the equihash solution instead of [u8; 1344] for now

This commit is contained in:
Deirdre Connolly 2019-09-26 03:01:49 -04:00 committed by Deirdre Connolly
parent c4547ea806
commit 677d53897f
3 changed files with 6 additions and 4 deletions

View File

@ -107,8 +107,11 @@ pub struct BlockHeader {
nonce: [u8; 32],
/// The Equihash solution.
// The solution size when serialized should be in bytes ('always 1344').
solution: [u8; 1344],
// The solution size when serialized should be in bytes ('always
// 1344'). I first tried this as a [u8; 1344] but until const
// generics land we'd have to implement all our common traits
// manually, like in pzec.
solution: Vec<u8>,
}
impl BlockHeader {

View File

@ -13,7 +13,6 @@
use std::io;
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
use crate::sha256d_writer::Sha256dWriter;
// XXX: Depending on if we implement SproutNoteCommitmentTree or
// similar, it may be worth it to define a NoteCommitmentTree trait.

View File

@ -164,7 +164,7 @@ pub enum Message {
nonce: [u8; 32],
/// The Equihash solution.
solution: [u8; 1344],
solution: Vec<u8>,
/// Transactions.
txns: Vec<Transaction>,