Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_nulldummy.py
Show All 16 Lines | |||||
from test_framework.blocktools import create_block, create_coinbase | from test_framework.blocktools import create_block, create_coinbase | ||||
from test_framework.messages import CTransaction, FromHex, ToHex | from test_framework.messages import CTransaction, FromHex, ToHex | ||||
from test_framework.mininode import network_thread_start | from test_framework.mininode import network_thread_start | ||||
from test_framework.script import CScript | from test_framework.script import CScript | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error | from test_framework.util import assert_equal, assert_raises_rpc_error | ||||
NULLDUMMY_ERROR = "64: non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero)" | NULLDUMMY_ERROR = "non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero) (code 64)" | ||||
def trueDummy(tx): | def trueDummy(tx): | ||||
scriptSig = CScript(tx.vin[0].scriptSig) | scriptSig = CScript(tx.vin[0].scriptSig) | ||||
newscript = [] | newscript = [] | ||||
for i in scriptSig: | for i in scriptSig: | ||||
if (len(newscript) == 0): | if (len(newscript) == 0): | ||||
assert(len(i) == 0) | assert(len(i) == 0) | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |