* Allow the sendTransaction preflight commitment level to be configured
(cherry picked from commit b660704faa
)
# Conflicts:
# cli/src/cli.rs
# core/src/rpc.rs
* rebase
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@@ -2101,7 +2101,9 @@ impl RpcSol for RpcSolImpl {
|
||||
.into());
|
||||
}
|
||||
|
||||
if let (Err(err), _log_output) = run_transaction_simulation(&bank, transaction.clone())
|
||||
let preflight_bank = &*meta.bank(config.preflight_commitment)?;
|
||||
if let (Err(err), _log_output) =
|
||||
run_transaction_simulation(&preflight_bank, transaction.clone())
|
||||
{
|
||||
// Note: it's possible that the transaction simulation failed but the actual
|
||||
// transaction would succeed, such as when a transaction depends on an earlier
|
||||
@@ -2134,7 +2136,7 @@ impl RpcSol for RpcSolImpl {
|
||||
Ok(())
|
||||
};
|
||||
|
||||
let bank = &*meta.bank(None)?;
|
||||
let bank = &*meta.bank(config.commitment)?;
|
||||
let logs = if result.is_ok() {
|
||||
let sim_result = run_transaction_simulation(&bank, transaction);
|
||||
result = sim_result.0;
|
||||
|
Reference in New Issue
Block a user