def METHOD_NAME(self):
    node = self.nodes[0]
    node.add_p2p_connection(P2PDataStore(node.time_to_connect))
    node.p2p.wait_for_getheaders(timeout=5)
    self.tip = node.getbestblockhash()
    best_block = node.getblock(self.tip)
    block_time = best_block["time"] + 1
    self.log.info("Incorrect xfield with xfieldType = 0")
    block = create_block(int(self.tip, 16), create_coinbase(1), block_time)
    block.xfieldType = 0
    block.xfield = b'1' 
    self.createblockproof(block, self.signblockprivkey)
    node.p2p.send_blocks_and_test([block], node, success=False, request_block=False)
    self.log.info("Incorrect xfield with xfieldType = 1")
    block = create_block(int(self.tip, 16), create_coinbase(1), block_time)
    block.xfieldType = 1
    block.xfield = b'1' 
    self.createblockproof(block, self.signblockprivkey)
    node.p2p.send_blocks_and_test([block], node, success=False, request_block=False, reject_code=16, reject_reason="bad-xfieldType-xfield")
    blockchaininfo = node.getblockchaininfo()
    assert_equal(blockchaininfo['warnings'], "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications")
    self.log.info("Incorrect xfield with xfieldType = 2")
    block = create_block(int(self.tip, 16), create_coinbase(1), block_time)
    block.xfieldType = 2
    block.xfield = b'1'
    self.createblockproof(block, self.signblockprivkey)
    assert_raises_rpc_error(-22, "", node.submitblock, bytes_to_hex_str(self.serializeblock_err(block)))
    blockchaininfo = node.getblockchaininfo()
    assert_equal(blockchaininfo['warnings'], "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications")
    self.log.info("Valid xfield with xfieldType = 2")
    node.p2p.send_blocks_and_test([block], node, True, True)
    assert_equal(block.hash, node.getbestblockhash())
    blockchaininfo = node.getblockchaininfo()
    assert_equal(blockchaininfo['warnings'], "Warning: Unknown xfieldType [%2x] was accepted in block [%s]" % (block.xfieldType, block.hash))
    self.log.info("Valid xfield with xfieldType = 0xFF")
    self.tip = node.getbestblockhash()
    block_time += 1
    block = create_block(int(self.tip, 16), create_coinbase(2), block_time)
    block.xfieldType = 0xFF
    block.xfield = b'1'
    self.createblockproof(block, self.signblockprivkey)
    node.p2p.send_blocks_and_test([block], node, True, True)
    assert_equal(block.hash, node.getbestblockhash())
    self.log.info("xfieldType = 3 in invalid block - insufficient tx input")
    self.tip = node.getbestblockhash()
    block_time += 1
    block = create_block(int(self.tip, 16), create_coinbase(3), block_time)
    block.xfieldType = 3
    block.xfield = b''
    spendHash = node.getblock(self.tip)['tx'][0]
    block.vtx += [create_transaction(node, spendHash, node.getnewaddress(), amount=100.0)]
    block.hashMerkleRoot = block.calc_merkle_root()
    block.hashImMerkleRoot = block.calc_immutable_merkle_root()
    self.createblockproof(block, self.signblockprivkey)
    oldblockhash = block.hash
    node.p2p.send_blocks_and_test([block], node, success=False, request_block=True, reject_code=16, reject_reason="bad-txns-in-belowout")
    assert_equal(self.tip, node.getbestblockhash())
    blockchaininfo = node.getblockchaininfo()
    assert_equal(blockchaininfo['warnings'], "Warning: Unknown xfieldType [%2x] was accepted in block [%s]" % (block.xfieldType, block.hash))
    self.log.info("xfieldType = 4 in invalid block - height in coinbase")
    block_time += 1
    block = create_block(int(self.tip, 16), create_coinbase(1), block_time)
    block.xfieldType = 4
    block.xfield = b''
    self.createblockproof(block, self.signblockprivkey)
    node.p2p.send_blocks_and_test([block], node, success=False, request_block=True, reject_code=16, reject_reason="bad-cb-invalid")
    assert_equal(self.tip, node.getbestblockhash())
    blockchaininfo = node.getblockchaininfo()
    assert_equal(blockchaininfo['warnings'], "Warning: Unknown xfieldType [%2x] was accepted in block [%s]" % (3, oldblockhash))
    self.log.info("xfieldType = 5 in invalid block - no coinbase")
    block_time += 1
    block = create_block(int(self.tip, 16), create_coinbase(4), block_time)
    block.xfieldType = 5
    block.xfield = b''
    block.vtx = []
    self.createblockproof(block, self.signblockprivkey)
    node.p2p.send_blocks_and_test([block], node, success=False, request_block=True, reject_code=16, reject_reason="bad-cb-missing")
    assert_equal(self.tip, node.getbestblockhash())
    blockchaininfo = node.getblockchaininfo()
    assert_equal(blockchaininfo['warnings'], "Warning: Unknown xfieldType [%2x] was accepted in block [%s]" % (3, oldblockhash))