| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.108 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 102 | public function verify(TransactionInterface $tx, ScriptInterface $scriptPubKey, $flags, $nInputToSign, $amount) |
|
| 20 | { |
||
| 21 | 102 | $error = 0; |
|
| 22 | 102 | if ($flags & InterpreterInterface::VERIFY_WITNESS) { |
|
| 23 | 48 | $verify = (bool) bitcoinconsensus_verify_script_with_amount($scriptPubKey->getBinary(), $amount, $tx->getWitnessBuffer()->getBinary(), $nInputToSign, $flags, $error); |
|
| 24 | 16 | } else { |
|
| 25 | 57 | $verify = (bool) bitcoinconsensus_verify_script($scriptPubKey->getBinary(), $tx->getBinary(), $nInputToSign, $flags, $error); |
|
| 26 | } |
||
| 27 | |||
| 28 | 102 | return $verify; |
|
| 29 | } |
||
| 30 | } |
||
| 31 |