@api_request
async def new_unfinished_block(self, new_unfinished_block: full_node_protocol.NewUnfinishedBlock) -> Optional[Message]:
    if self.full_node.sync_store.get_sync_mode():
        return None
    block_hash = new_unfinished_block.unfinished_reward_hash
    if (self.full_node.full_node_store.get_unfinished_block(block_hash) is not None):
        return None
    if (block_hash in self.full_node.full_node_store.requesting_unfinished_blocks):
        return None
    msg = make_msg(ProtocolMessageTypes.request_unfinished_block, full_node_protocol.RequestUnfinishedBlock(block_hash))
    self.full_node.full_node_store.requesting_unfinished_blocks.add(block_hash)

    async def eventually_clear():
        (await asyncio.sleep(5))
        if (block_hash in self.full_node.full_node_store.requesting_unfinished_blocks):
            self.full_node.full_node_store.requesting_unfinished_blocks.remove(block_hash)
    asyncio.create_task(eventually_clear())
    return msg
@api_request
async def new_unfinished_block(self, new_unfinished_block: full_node_protocol.NewUnfinishedBlock) -> Optional[Message]:
    if self.full_node.sync_store.get_sync_mode():
        return None
    block_hash = new_unfinished_block.unfinished_reward_hash
    if (self.full_node.full_node_store.get_unfinished_block(block_hash) is not None):
        return None
    if (block_hash in self.full_node.full_node_store.requesting_unfinished_blocks):
        return None
    msg = make_msg(ProtocolMessageTypes.request_unfinished_block, full_node_protocol.RequestUnfinishedBlock(block_hash))
    self.full_node.full_node_store.requesting_unfinished_blocks.add(block_hash)

    async def eventually_clear():
        (await asyncio.sleep(5))
        if (block_hash in self.full_node.full_node_store.requesting_unfinished_blocks):
            self.full_node.full_node_store.requesting_unfinished_blocks.remove(block_hash)
    asyncio.create_task(eventually_clear())
    return msg