Funds in Bitcoin are tracked within the type of Unspent Transaction Outputs (UTXOs). Each totally validating node processes the whole blockchain to calculate the presently present spendable funds, the Unspent Transaction Output set (UTXO set).
When a node learns a few new transaction, it removes the UTXOs spent by the transaction from the UTXO set: UTXOs solely might be spent in full, utilizing one as an enter makes use of it up utterly.
If later the node learns a few second transaction that spends one of many identical UTXOs, the UTXO will now not be within the UTXO set, and the transaction will likely be rejected resulting from spending funds that aren’t out there for spending.
