Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-checkdatasig-activation.py
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | def create_checkdatasig_tx(self, count): | ||||
'30440220256c12175e809381f97637933ed6ab97737d263eaaebca6add21bced67fd12a402205ce29ecc1369d6fc1b51977ed38faaf41119e3be1d7edfafd7cfaf0b6061bd07') | '30440220256c12175e809381f97637933ed6ab97737d263eaaebca6add21bced67fd12a402205ce29ecc1369d6fc1b51977ed38faaf41119e3be1d7edfafd7cfaf0b6061bd07') | ||||
message = bytearray.fromhex('') | message = bytearray.fromhex('') | ||||
pubkey = bytearray.fromhex( | pubkey = bytearray.fromhex( | ||||
'038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508') | '038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508') | ||||
for _ in range(count): | for _ in range(count): | ||||
tx.vout.append(CTxOut(value, CScript( | tx.vout.append(CTxOut(value, CScript( | ||||
[signature, message, pubkey, OP_CHECKDATASIG]))) | [signature, message, pubkey, OP_CHECKDATASIG]))) | ||||
tx.vout[0].nValue -= node.calculate_fee(tx) | tx.vout[0].nValue -= node.calculate_fee(tx) | ||||
tx_signed = node.signrawtransaction(ToHex(tx))["hex"] | tx_signed = node.signrawtransactionwithwallet(ToHex(tx))["hex"] | ||||
return tx_signed | return tx_signed | ||||
def run_test(self): | def run_test(self): | ||||
self.test = TestManager(self, self.options.tmpdir) | self.test = TestManager(self, self.options.tmpdir) | ||||
self.test.add_all_connections(self.nodes) | self.test.add_all_connections(self.nodes) | ||||
# Start up network handling in another thread | # Start up network handling in another thread | ||||
NetworkThread().start() | NetworkThread().start() | ||||
self.test.run() | self.test.run() | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |