Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_nulldummy.py
Show All 29 Lines | |||||
NULLDUMMY_ERROR = "non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero) (code 64)" | 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 | ||||
newscript.append(b'\x51') | newscript.append(b'\x51') | ||||
else: | else: | ||||
newscript.append(i) | newscript.append(i) | ||||
tx.vin[0].scriptSig = CScript(newscript) | tx.vin[0].scriptSig = CScript(newscript) | ||||
tx.rehash() | tx.rehash() | ||||
class NULLDUMMYTest(BitcoinTestFramework): | class NULLDUMMYTest(BitcoinTestFramework): | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |