Request updates for new change addresses.

When sending a new transaction, the change address must receive the
same updates as explicitly-generated addresses.  Without this
notification, the unconfirmed UTXO will never become confirmed as the
notification will never be received.

This fixes the issue where change UTXOs never move from "Unconfirmed"
to "Balance" in btcgui.
This commit is contained in:
Josh Rickmar 2013-10-28 14:13:20 -04:00
parent dea80bae9b
commit b34563bbd9

View file

@ -368,6 +368,9 @@ func SendFrom(reply chan []byte, msg *btcjson.Message) {
return return
} }
// Request updates for change address.
w.ReqNewTxsForAddress(createdTx.changeAddr)
// Send rawtx off to btcd // Send rawtx off to btcd
n := <-NewJSONID n := <-NewJSONID
var id interface{} = fmt.Sprintf("btcwallet(%v)", n) var id interface{} = fmt.Sprintf("btcwallet(%v)", n)
@ -523,6 +526,9 @@ func SendMany(reply chan []byte, msg *btcjson.Message) {
return return
} }
// Request updates for change address.
w.ReqNewTxsForAddress(createdTx.changeAddr)
// Send rawtx off to btcd // Send rawtx off to btcd
n := <-NewJSONID n := <-NewJSONID
var id interface{} = fmt.Sprintf("btcwallet(%v)", n) var id interface{} = fmt.Sprintf("btcwallet(%v)", n)