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:
parent
69dbad5999
commit
bbb24db42c
2 changed files with 5 additions and 5 deletions
|
@ -425,7 +425,7 @@ func (a *Account) Track() {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
|
||||||
err := NotifyNewTXs(CurrentServerConn(), addrstrs)
|
err := NotifyReceived(CurrentServerConn(), addrstrs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Unable to request transaction updates for address.")
|
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)
|
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 {
|
if err != nil {
|
||||||
log.Error("Unable to request transaction updates for address.")
|
log.Error("Unable to request transaction updates for address.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,10 +340,10 @@ func NotifyBlocks(rpc ServerConn) *btcjson.Error {
|
||||||
return jsonErr
|
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.
|
// to any of the addresses in addrs.
|
||||||
func NotifyNewTXs(rpc ServerConn, addrs []string) *btcjson.Error {
|
func NotifyReceived(rpc ServerConn, addrs []string) *btcjson.Error {
|
||||||
cmd := btcws.NewNotifyNewTXsCmd(<-NewJSONID, addrs)
|
cmd := btcws.NewNotifyReceivedCmd(<-NewJSONID, addrs)
|
||||||
response := <-rpc.SendRequest(NewServerRequest(cmd))
|
response := <-rpc.SendRequest(NewServerRequest(cmd))
|
||||||
_, jsonErr := response.FinishUnmarshal(nil)
|
_, jsonErr := response.FinishUnmarshal(nil)
|
||||||
return jsonErr
|
return jsonErr
|
||||||
|
|
Loading…
Reference in a new issue