Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwallet
  Commit: b1c246c01bfb18cdf0387a32cf9a03e02e849525
      
https://github.com/conformal/btcwallet/commit/b1c246c01bfb18cdf0387a32cf9a03e02e849525
  Author: Josh Rickmar <[email protected]>
  Date:   2013-10-22 (Tue, 22 Oct 2013)

  Changed paths:
    M cmd.go
    M cmdmgr.go
    M createtx.go
    M tx/tx.go

  Log Message:
  -----------
  Perform smarter UTXO tracking.

This change fixes many issues with the tracking of unspent transaction
outputs.  First, notifications for when UTXOs arse spent are now
requested from btcd, and when spent, will be removed from the
UtxoStore.

Second, when transactions are created, the unconfirmed (not yet in a
block) Utxo (with block height -1 and zeroed block hash) is added to
the wallet's UtxoStore.  Notifications for when this UTXO is spent are
also requested from btcd.  After the tx appears in a block, because
the UTXO has a pkScript to be spent by another owned wallet address, a
notification with the UTXO will be sent to btcwallet.  We already
store the unconfirmed UTXO, so at this point the actual block height
and hash are filled in.

Finally, when calculating the balance, if confirmations is zero,
unconfirmed UTXOs (block height -1) will be included in the balance.
Otherwise, they are ignored.



Reply via email to