Move a quick check earlier in transaction validation
This commit is contained in:
parent
b77f41419e
commit
f8dc989e99
|
@ -155,13 +155,14 @@ where
|
|||
// We finish by waiting on these below.
|
||||
let mut async_checks = FuturesUnordered::new();
|
||||
|
||||
// Do basic checks first
|
||||
check::has_inputs_and_outputs(&tx)?;
|
||||
|
||||
// Handle transparent inputs and outputs.
|
||||
if tx.is_coinbase() {
|
||||
check::coinbase_tx_no_joinsplit_or_spend(&tx)?;
|
||||
} else {
|
||||
// TODO: check no coinbase inputs
|
||||
|
||||
// feed all of the inputs to the script verifier
|
||||
// feed all of the inputs to the script and shielded verifiers
|
||||
let cached_ffi_transaction =
|
||||
Arc::new(CachedFfiTransaction::new(tx.clone()));
|
||||
|
||||
|
@ -177,8 +178,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
check::has_inputs_and_outputs(&tx)?;
|
||||
|
||||
// TODO: rework this code #1377
|
||||
let sighash = tx.sighash(
|
||||
upgrade,
|
||||
|
|
Loading…
Reference in New Issue