Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Translation: I was right, there's no mistaking it
そうだったの means "Is that so!", "Now I understand". This phrase ～だと思った probably would follow after オレはてっきり. So it means "I certainly thought that ～".