Script opcode and data support

Overrides the shift-left operator for pushing opcodes onto the Script,
matching the notation used in zcashd.
This commit is contained in:
Jack Grigg
2019-05-24 12:30:14 +01:00
parent 1862354ea6
commit dab3c002b7
5 changed files with 111 additions and 21 deletions

View File

@@ -3,10 +3,11 @@ use byteorder::{LittleEndian, WriteBytesExt};
use ff::{PrimeField, PrimeFieldRepr};
use super::{
components::{Amount, Script, TxOut},
components::{Amount, TxOut},
Transaction, TransactionData, OVERWINTER_VERSION_GROUP_ID, SAPLING_TX_VERSION,
SAPLING_VERSION_GROUP_ID,
};
use legacy::Script;
const ZCASH_SIGHASH_PERSONALIZATION_PREFIX: &'static [u8; 12] = b"ZcashSigHash";
const ZCASH_PREVOUTS_HASH_PERSONALIZATION: &'static [u8; 16] = b"ZcashPrevoutHash";