mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-01-28 22:42:14 +00:00
use u32 instead of consesus::BranchID for transaction building. Enables multichain useage.
This commit is contained in:
parent
0883d7f3fc
commit
2981c4d286
@ -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();
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user