Update for notifynewtxs to notifyreceived rename.

The websocket extension command to register for notifications when an
address receives funds has been renamed.  This commit catches up to the
change.

ok @jrick
This commit is contained in:
Dave Collins 2014-04-14 19:20:00 -05:00
parent 69dbad5999
commit bbb24db42c
2 changed files with 5 additions and 5 deletions

View file

@ -425,7 +425,7 @@ func (a *Account) Track() {
i++
}
err := NotifyNewTXs(CurrentServerConn(), addrstrs)
err := NotifyReceived(CurrentServerConn(), addrstrs)
if err != nil {
log.Error("Unable to request transaction updates for address.")
}
@ -616,7 +616,7 @@ func (a *Account) ReqNewTxsForAddress(addr btcutil.Address) {
log.Debugf("Requesting notifications of TXs sending to address %v", apkh)
err := NotifyNewTXs(CurrentServerConn(), []string{apkh.EncodeAddress()})
err := NotifyReceived(CurrentServerConn(), []string{apkh.EncodeAddress()})
if err != nil {
log.Error("Unable to request transaction updates for address.")
}

View file

@ -340,10 +340,10 @@ func NotifyBlocks(rpc ServerConn) *btcjson.Error {
return jsonErr
}
// NotifyNewTXs requests notifications for new transactions that spend
// NotifyReceived requests notifications for new transactions that spend
// to any of the addresses in addrs.
func NotifyNewTXs(rpc ServerConn, addrs []string) *btcjson.Error {
cmd := btcws.NewNotifyNewTXsCmd(<-NewJSONID, addrs)
func NotifyReceived(rpc ServerConn, addrs []string) *btcjson.Error {
cmd := btcws.NewNotifyReceivedCmd(<-NewJSONID, addrs)
response := <-rpc.SendRequest(NewServerRequest(cmd))
_, jsonErr := response.FinishUnmarshal(nil)
return jsonErr