use u32 instead of consesus::BranchID for transaction building. Enables multichain useage.

This commit is contained in:
Cryptoforge 2020-10-12 15:01:31 -07:00
parent 0883d7f3fc
commit 2981c4d286
2 changed files with 4 additions and 4 deletions

View File

@ -214,7 +214,7 @@ impl TransparentInputs {
fn apply_signatures(
&self,
mtx: &mut TransactionData,
consensus_branch_id: consensus::BranchId,
consensus_branch_id: u32,
) {
let mut sighash = [0u8; 32];
for (i, info) in self.inputs.iter().enumerate() {
@ -438,7 +438,7 @@ impl<R: RngCore + CryptoRng> Builder<R> {
/// the network.
pub fn build(
mut self,
consensus_branch_id: consensus::BranchId,
consensus_branch_id: u32,
prover: &impl TxProver,
) -> Result<(Transaction, TransactionMetadata), Error> {
let mut tx_metadata = TransactionMetadata::new();

View File

@ -152,7 +152,7 @@ fn shielded_outputs_hash(tx: &TransactionData) -> Blake2bHash {
pub fn signature_hash_data(
tx: &TransactionData,
consensus_branch_id: consensus::BranchId,
consensus_branch_id: u32,
hash_type: u32,
transparent_input: Option<(usize, &Script, Amount)>,
) -> Vec<u8> {
@ -230,7 +230,7 @@ pub fn signature_hash_data(
pub fn signature_hash(
tx: &Transaction,
consensus_branch_id: consensus::BranchId,
consensus_branch_id: u32,
hash_type: u32,
transparent_input: Option<(usize, &Script, Amount)>,
) -> Vec<u8> {