I have a question for anybody familiar with the Bitcoin codebase. I'm interested in how spent/unspent outputs are tracked to prevent double spends, specifically I just want to know what data structures are used for checking if a output is spent or not (i.e. to prevent double spends). I know this could be done with a hash table or bloom filter.
I took a quick look through the codebase, I would have expected it to be
https://github.com/bitcoin/bitcoin/blob/master/src/txdb.h#L59 although this
HaveCoin seems to check the existence of the coin - not if it's spent or not.
It would take me a long time to read through the code and figure this out so I'm hoping somebody who already knows the answer can help me.
Thanks in advance.