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 advice that something has been received, but counting them as balance or spending them is premature.  https://t.co/TErHsbMsup