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.
This commit is contained in:
Dave Collins 2014-04-14 19:11:08 -05:00
parent de51409185
commit 05a7979292

View file

@ -50,7 +50,7 @@ var wsHandlers = map[string]wsCommandHandler{
"getcurrentnet": handleGetCurrentNet,
"notifyblocks": handleNotifyBlocks,
"notifyallnewtxs": handleNotifyAllNewTXs,
"notifynewtxs": handleNotifyNewTXs,
"notifyreceived": handleNotifyReceived,
"notifyspent": handleNotifySpent,
"rescan": handleRescan,
}
@ -1443,10 +1443,10 @@ func handleNotifyAllNewTXs(wsc *wsClient, icmd btcjson.Cmd) (interface{}, *btcjs
return nil, nil
}
// handleNotifyNewTXs implements the notifynewtxs command extension for
// handleNotifyReceived implements the notifyreceived command extension for
// websocket connections.
func handleNotifyNewTXs(wsc *wsClient, icmd btcjson.Cmd) (interface{}, *btcjson.Error) {
cmd, ok := icmd.(*btcws.NotifyNewTXsCmd)
func handleNotifyReceived(wsc *wsClient, icmd btcjson.Cmd) (interface{}, *btcjson.Error) {
cmd, ok := icmd.(*btcws.NotifyReceivedCmd)
if !ok {
return nil, &btcjson.ErrInternal
}