Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_nulldummy.py
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.log.info( | self.log.info( | ||||
"Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]") | "Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]") | ||||
self.block_submit(self.nodes[0], [test2tx], True) | self.block_submit(self.nodes[0], [test2tx], True) | ||||
def create_transaction(self, node, txid, to_address, amount): | def create_transaction(self, node, txid, to_address, amount): | ||||
inputs = [{"txid": txid, "vout": 0}] | inputs = [{"txid": txid, "vout": 0}] | ||||
outputs = {to_address: amount} | outputs = {to_address: amount} | ||||
rawtx = node.createrawtransaction(inputs, outputs) | rawtx = node.createrawtransaction(inputs, outputs) | ||||
signresult = node.signrawtransaction(rawtx) | signresult = node.signrawtransactionwithwallet(rawtx) | ||||
return FromHex(CTransaction(), signresult['hex']) | return FromHex(CTransaction(), signresult['hex']) | ||||
def block_submit(self, node, txs, accept=False): | def block_submit(self, node, txs, accept=False): | ||||
block = create_block(self.tip, create_coinbase( | block = create_block(self.tip, create_coinbase( | ||||
self.lastblockheight + 1), self.lastblocktime + 1) | self.lastblockheight + 1), self.lastblocktime + 1) | ||||
block.nVersion = 4 | block.nVersion = 4 | ||||
for tx in txs: | for tx in txs: | ||||
tx.rehash() | tx.rehash() | ||||
Show All 19 Lines |