예제 #1
0
 /**
  * @param UtxoView $view
  * @param TransactionInterface $tx
  * @param int $height
  * @param Flags $flags
  * @param bool|true $checkScripts
  * @return bool
  */
 public function checkInputs(UtxoView $view, TransactionInterface $tx, $height, Flags $flags, $checkScripts = true)
 {
     if (!$tx->isCoinbase()) {
         $this->checkContextualInputs($view, $tx, $height);
         if ($checkScripts) {
             if (!$this->scriptCheck->check($view, $tx, $flags)) {
                 throw new \RuntimeException('Script verification failed');
             }
         }
     }
     return true;
 }
예제 #2
0
 /**
  * @param UtxoView $view
  * @param TransactionInterface $tx
  * @param int $height
  * @param int $flags
  * @param ScriptValidationInterface $state
  * @return $this
  */
 public function checkInputs(UtxoView $view, TransactionInterface $tx, $height, $flags, ScriptValidationInterface $state)
 {
     if (!$tx->isCoinbase()) {
         $this->checkContextualInputs($view, $tx, $height);
         if ($state->active()) {
             $state->queue($view, $tx);
         }
     }
     return $this;
 }