Formatter fix.

This commit is contained in:
Kris Nuttycombe 2020-06-26 09:57:02 -06:00
parent 4bf6309c54
commit 81b6f8afd7
1 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ enum SigHashVersion {
Sprout,
Overwinter,
Sapling,
Next,
Future,
}
impl SigHashVersion {
@ -56,7 +56,7 @@ impl SigHashVersion {
match tx.version_group_id {
OVERWINTER_VERSION_GROUP_ID => SigHashVersion::Overwinter,
SAPLING_VERSION_GROUP_ID => SigHashVersion::Sapling,
FUTURE_VERSION_GROUP_ID => SigHashVersion::Next,
FUTURE_VERSION_GROUP_ID => SigHashVersion::Future,
_ => unimplemented!(),
}
} else {
@ -194,7 +194,7 @@ pub fn signature_hash_data<'a>(
) -> Vec<u8> {
let sigversion = SigHashVersion::from_tx(tx);
match sigversion {
SigHashVersion::Overwinter | SigHashVersion::Sapling | SigHashVersion::Next => {
SigHashVersion::Overwinter | SigHashVersion::Sapling | SigHashVersion::Future => {
let mut personal = [0; 16];
(&mut personal[..12]).copy_from_slice(ZCASH_SIGHASH_PERSONALIZATION_PREFIX);
(&mut personal[12..])
@ -268,7 +268,7 @@ pub fn signature_hash_data<'a>(
index,
precondition,
value,
} if sigversion == SigHashVersion::Next => {
} if sigversion == SigHashVersion::Future => {
let mut data = ZCASH_TZE_SIGNED_INPUT_DOMAIN_SEPARATOR.to_vec();
tx.tze_inputs[index].prevout.write(&mut data).unwrap();