Detect and handle block chain forks