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.
This commit is contained in:
parent
7162a11995
commit
8ac86f1053
1 changed files with 0 additions and 10 deletions
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue