Skip to content

Commit

Permalink
Fixed local tx prover dependency regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
Murisi Tarusenga committed May 25, 2023
1 parent 8412e41 commit 16b9734
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
16 changes: 4 additions & 12 deletions shared/src/ledger/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1386,21 +1386,13 @@ impl<U: ShieldedUtils> ShieldedContext<U> {
return Err(builder::Error::InsufficientFunds(additional));
}
}

let prover = if let Ok(params_dir) = env::var(ENV_VAR_MASP_PARAMS_DIR) {
let params_dir = PathBuf::from(params_dir);
let spend_path = params_dir.join(SPEND_NAME);
let convert_path = params_dir.join(CONVERT_NAME);
let output_path = params_dir.join(OUTPUT_NAME);
LocalTxProver::new(&spend_path, &output_path, &convert_path)
} else {
LocalTxProver::with_default_location()
.expect("unable to load MASP Parameters")
};
// Build and return the constructed transaction
builder
.clone()
.build(&prover, &FeeRule::non_standard(tx_fee))
.build(
&self.utils.local_tx_prover(),
&FeeRule::non_standard(tx_fee),
)
.map(|(tx, metadata)| {
Some((builder.map_builder(WalletMap), tx, metadata, epoch))
})
Expand Down
2 changes: 1 addition & 1 deletion shared/src/ledger/queries/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ where
use crate::ledger::storage::write_log::WriteLog;
use crate::proto::Tx;
use crate::types::storage::TxIndex;
use crate::types::transaction::TxType;
use crate::types::transaction::decrypted::DecryptedTx;
use crate::types::transaction::TxType;

let mut gas_meter = BlockGasMeter::default();
let mut write_log = WriteLog::default();
Expand Down
Binary file modified wasm_for_tests/tx_write_storage_key.wasm
Binary file not shown.

0 comments on commit 16b9734

Please sign in to comment.