def test_invalid_cmpctblock_message(self):
    self.nodes[0].generate(101)
    block = self.build_block_on_tip(self.nodes[0])
    cmpct_block = P2PHeaderAndShortIDs()
    cmpct_block.header = CBlockHeader(block)
    cmpct_block.prefilled_txn_length = 1
    prefilled_txn = PrefilledTransaction(1, block.vtx[0])
    cmpct_block.prefilled_txn = [prefilled_txn]
    self.test_node.send_await_disconnect(msg_cmpctblock(cmpct_block))
    assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.hashPrevBlock)
def test_invalid_cmpctblock_message(self):
    self.nodes[0].generate(101)
    block = self.build_block_on_tip(self.nodes[0])
    cmpct_block = P2PHeaderAndShortIDs()
    cmpct_block.header = CBlockHeader(block)
    cmpct_block.prefilled_txn_length = 1
    prefilled_txn = PrefilledTransaction(1, block.vtx[0])
    cmpct_block.prefilled_txn = [prefilled_txn]
    self.test_node.send_await_disconnect(msg_cmpctblock(cmpct_block))
    assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.hashPrevBlock)