Use Option<[u8; N]> for JoinSplit pubkey and signature in a transaction

This commit is contained in:
Jack Grigg
2018-11-30 01:08:45 +00:00
parent 9b06205ed6
commit d707ebd321
3 changed files with 88 additions and 14 deletions

View File

@@ -110,7 +110,7 @@ fn joinsplits_hash(tx: &TransactionData) -> Vec<u8> {
for js in &tx.joinsplits {
js.write(&mut data).unwrap();
}
data.extend_from_slice(&tx.joinsplit_pubkey);
data.extend_from_slice(&tx.joinsplit_pubkey.unwrap());
let mut h = Blake2b::with_params(32, &[], &[], ZCASH_JOINSPLITS_HASH_PERSONALIZATION);
h.update(&data);
h.finalize().as_ref().to_vec()