Nothing that you describe sounds to me like academic dishonesty. The point of having other students around is to gain something from interacting with them, and your interactions with your study partner sound like helpful studying together rather than "collusion". If I understand it correctly, you did all the writing independently, but you had each done some reading that the other hadn't, and you used that to suggest to each other what you should go back and read and then write about. For me, the only thing that could be problematic is if you used your friend's references to the text without yourself going back to the text. This would be a failure of due diligence and a (rather mild, I think) instance of academic dishonesty, as you are creating the impression that you read something that you didn't read. Again I want to emphasize that for me this is quite mild: even professionals sometimes quote things secondhand.
On the other hand, internet strangers can only give you so much absolution. If you are concerned that you might have done something wrong -- and it sounds like you are -- talk to your instructor about it. Be honest, explain that your worry that your actions might possibly be problematic came only upon reading the honor code later, and see what the instructor says. The most likely outcome is that the instructor will largely or completely allay your worries, and you will probably also gain a better understanding of what sort of collaboration is helpful and what is forbidden. There is a chance that the instructor will regard your behavior as actionably problematic, but if so the honorable thing would still be to bring it up.
Good luck.
Added: The above advice is under the assumption that you have no reason to think your instructor or institution will wildly overreact to what should be, at worst, a minor infraction. I don't really agree with the comments which imply that one can never know whether this will happen: in fact, a student attending a particular institution and a particular course should be able to get some sense of this.
If the OP feels that there is a chance that something bad will happen or feels somehow unqualified to think rationally about it (there are a few hints of that here, honestly) he could take a more intermediate step to figure out which way the wind is blowing. For instance he could talk to an ombudsperson or university official and ask about the legitimacy of such a practice in general terms. In another situation he could bring this up hypothetically to the instructor, but in this case that seems like a poor safeguard: since the course is over, I can't think of any reason a student would bring this up to the instructor unless he has performed the practice he's asking about.
Anyway, given that the OP is worried about something that I think but am not completely sure he does not need to worry about, I think he should seek reassurance in some way. Maybe others regard this behavior of the OP as being primarily pathological / OCD. I don't see it that way: concern about whether you've violated the honor code is not pathological. The OP is behaving in a way which is atypical of most students I've known, but not atypically worse. Moreover, talking to someone will give him a clear idea of the line between collaboration and collusion, which should be helpful to him in his last year of study. Lingering guilty feelings seem much less healthy and productive.