/** * @param UtxoView $utxoView * @param TransactionInterface $tx * @return ScriptValidationInterface */ public function queue(UtxoView $utxoView, TransactionInterface $tx) { for ($i = 0, $c = count($tx->getInputs()); $i < $c; $i++) { $output = $utxoView->fetchByInput($tx->getInput($i))->getOutput(); $witness = isset($tx->getWitnesses()[$i]) ? $tx->getWitness($i) : null; $this->results[] = $this->consensus->verify($tx, $output->getScript(), $i, $output->getValue(), $witness); } return $this; }