From 8ac86f105301f19c0a87bdee8337c6ae34ec3093 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 19 Feb 2014 09:47:17 -0600 Subject: [PATCH] Allow notifications to work for all address types. Previously the websocket notifications for addresses were limited to pay-to-pubkey-hash only. This commit removes that restriction so all btcutil.Address types are supported. This includes pay-to-pubkey, pay-to-pubkey-hash, and pay-to-script-hash. --- rpcwebsocket.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/rpcwebsocket.go b/rpcwebsocket.go index e03c53ab..15c3b7cf 100644 --- a/rpcwebsocket.go +++ b/rpcwebsocket.go @@ -1231,16 +1231,6 @@ func handleNotifyNewTXs(wsc *wsClient, icmd btcjson.Cmd) (interface{}, *btcjson. return nil, &e } - // TODO(jrick) Notifying for non-P2PKH addresses is currently - // unsuported. - if _, ok := addr.(*btcutil.AddressPubKeyHash); !ok { - e := btcjson.Error{ - Code: btcjson.ErrInvalidAddressOrKey.Code, - Message: fmt.Sprintf("Invalid address or key: %v", addr.EncodeAddress()), - } - return nil, &e - } - wsc.server.ntfnMgr.AddAddrRequest(wsc, addr.EncodeAddress()) }