Skip to content

Commit

Permalink
use LocalTxProver::from_bytes directly for creating LocalTxProver
Browse files Browse the repository at this point in the history
Signed-off-by: borngraced <[email protected]>
  • Loading branch information
borngraced committed Nov 1, 2023
1 parent cf6891b commit 532d901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions mm2src/coins/z_coin/storage/walletdb/wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use zcash_primitives::merkle_tree::IncrementalWitness;
use zcash_primitives::sapling::Diversifier;
use zcash_primitives::sapling::Rseed;
use zcash_primitives::transaction::components::Amount;
use zcash_proofs::parse_parameters;
use zcash_proofs::prover::LocalTxProver;

struct SpendableNoteConstructor {
Expand All @@ -25,13 +24,7 @@ struct SpendableNoteConstructor {

fn test_prover() -> LocalTxProver {
let (spend_buf, output_buf) = wagyu_zcash_parameters::load_sapling_parameters();
let p = parse_parameters(&spend_buf[..], &output_buf[..], None);

LocalTxProver {
spend_params: p.spend_params,
spend_vk: p.spend_vk,
output_params: p.output_params,
}
LocalTxProver::from_bytes(&spend_buf[..], &output_buf[..])
}

fn to_spendable_note(note: SpendableNoteConstructor) -> MmResult<SpendableNote, ZcoinStorageError> {
Expand Down
2 changes: 1 addition & 1 deletion mm2src/coins/z_coin/storage/walletdb/wasm/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl<'a> WalletIndexedDb {
};

let index_keys = MultiIndex::new(WalletDbAccountsTable::TICKER_ACCOUNT_INDEX)
.with_value(&ticker)?
.with_value(&self.ticker)?
.with_value(account_int)?;

walletdb_account_table
Expand Down

0 comments on commit 532d901

Please sign in to comment.