diff --git a/account.go b/account.go index 73082d2..3cebcad 100644 --- a/account.go +++ b/account.go @@ -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.") } diff --git a/rpcclient.go b/rpcclient.go index cf37530..1259e80 100644 --- a/rpcclient.go +++ b/rpcclient.go @@ -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