Implements fetch_next_block.