Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_dersig.py
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
) | ) | ||||
# Now we verify that a block with this transaction is also invalid. | # Now we verify that a block with this transaction is also invalid. | ||||
block.vtx.append(spendtx) | block.vtx.append(spendtx) | ||||
block.hashMerkleRoot = block.calc_merkle_root() | block.hashMerkleRoot = block.calc_merkle_root() | ||||
block.rehash() | block.rehash() | ||||
block.solve() | block.solve() | ||||
with self.nodes[0].assert_debug_log(expected_msgs=['ConnectBlock {} failed (blk-bad-inputs'.format(block.hash)]): | with self.nodes[0].assert_debug_log(expected_msgs=['ConnectBlock {} failed, blk-bad-inputs'.format(block.hash)]): | ||||
self.nodes[0].p2p.send_and_ping(msg_block(block)) | self.nodes[0].p2p.send_and_ping(msg_block(block)) | ||||
assert_equal(self.nodes[0].getbestblockhash(), tip) | assert_equal(self.nodes[0].getbestblockhash(), tip) | ||||
self.nodes[0].p2p.sync_with_ping() | self.nodes[0].p2p.sync_with_ping() | ||||
wait_until(lambda: "reject" in self.nodes[0].p2p.last_message.keys(), | wait_until(lambda: "reject" in self.nodes[0].p2p.last_message.keys(), | ||||
lock=mininode_lock) | lock=mininode_lock) | ||||
with mininode_lock: | with mininode_lock: | ||||
assert self.nodes[0].p2p.last_message["reject"].code in [ | assert self.nodes[0].p2p.last_message["reject"].code in [ | ||||
Show All 19 Lines |