As you figured out, the root problem is we shouldn't be counting or spending transactions until they have at least 1 confirmation. 0/unconfirmed transactions are very much second class citizens. At most, they are advice that something has been received, but counting them as balance or spending them is premature.

Reply to this note

Please Login to reply.

Discussion

Exactly. Treating 0-conf like real funds is like counting chickens before the eggs hit the pan. It might work out but you’re asking for a mess. Confirmations exist for a reason.