This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
forked from adityapk00/zecwallet-light-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dannasessha/compiling_tests
WIP: moving to new_transactiondata() in blaze
- Loading branch information
Showing
5 changed files
with
45 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1633,3 +1633,6 @@ pub mod tests; | |
|
||
#[cfg(test)] | ||
pub(crate) mod test_server; | ||
|
||
#[cfg(test)] | ||
pub(crate) mod testmocks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use zcash_primitives::consensus::BranchId; | ||
use zcash_primitives::sapling::redjubjub::Signature; | ||
use zcash_primitives::transaction::components::{sapling, Amount}; | ||
use zcash_primitives::transaction::{TransactionData, TxVersion}; | ||
pub fn new_transactiondata() -> TransactionData<zcash_primitives::transaction::Authorized> { | ||
let authorization = sapling::Authorized { | ||
binding_sig: Signature::read(&vec![0u8; 64][..]).expect("Signature read error!"), | ||
}; | ||
let sapling_bundle = sapling::Bundle { | ||
shielded_spends: vec![], | ||
shielded_outputs: vec![], | ||
value_balance: Amount::zero(), | ||
authorization, | ||
}; | ||
let td: TransactionData<zcash_primitives::transaction::Authorized> = TransactionData::from_parts( | ||
TxVersion::Sapling, | ||
BranchId::Sapling, | ||
0, | ||
0u32.into(), | ||
None, | ||
None, | ||
Some(sapling_bundle), | ||
None, | ||
); | ||
|
||
td | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters