Branch: refs/heads/master
  Home:   https://github.com/conformal/btcd
  Commit: 618b885e9e4cdc78cdf086b95de937fcf9e8daa7
      
https://github.com/conformal/btcd/commit/618b885e9e4cdc78cdf086b95de937fcf9e8daa7
  Author: Josh Rickmar <[email protected]>
  Date:   2013-10-23 (Wed, 23 Oct 2013)

  Changed paths:
    M blockmanager.go
    M rpcserver.go

  Log Message:
  -----------
  Notify wallets of mined transactions.

This change allows btcwallet to keep a pool of transactions that have
not yet been mined into a block, notifying wallet when transactions
are mined, as well as introducing a new way to send the
btcd:blockconnected notification with wallet-specific information as
part of the same notification.  When a transaction is sent using the
RPC call 'sendrawtransaction', a notification request will be
automatically registered with the connected wallet (if using
websockets) to notify the wallet when the transaction first appears in
a block.

To perform this notification, and to avoid requiring wallets from
waiting for seperate mined tx notifications (and resend after a
timeout) or from sending an additional tx mined request for every tx
in the pool after each new block, the blockconnected notification is
now created seperately for each wallet.  If the notified wallet has
sent a transaction, an additional JSON field "minedtxs" will include
an array of transaction IDs that the wallet has created and which are
included in the new block.

This new unique blockconnected notification can also be used for
additional notifications that may happen each new block in the future,
and to cut down on existing notification handlers in btcwallet, such
as for transactions to a watched address.



Reply via email to