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