Update for recent btcutil.Address API change.

This commit is contained in:
Dave Collins 2014-03-18 20:44:03 -05:00
parent 239e13c0a5
commit 3b9b11cb41
2 changed files with 3 additions and 2 deletions

View file

@ -531,7 +531,8 @@ func handleCreateRawTransaction(s *rpcServer, cmd btcjson.Cmd) (interface{}, err
} }
// Decode the provided address. // Decode the provided address.
addr, err := btcutil.DecodeAddr(encodedAddr) addr, err := btcutil.DecodeAddress(encodedAddr,
activeNetParams.btcnet)
if err != nil { if err != nil {
return nil, btcjson.Error{ return nil, btcjson.Error{
Code: btcjson.ErrInvalidAddressOrKey.Code, Code: btcjson.ErrInvalidAddressOrKey.Code,

View file

@ -1416,7 +1416,7 @@ func handleNotifyNewTXs(wsc *wsClient, icmd btcjson.Cmd) (interface{}, *btcjson.
} }
for _, addrStr := range cmd.Addresses { for _, addrStr := range cmd.Addresses {
addr, err := btcutil.DecodeAddr(addrStr) addr, err := btcutil.DecodeAddress(addrStr, activeNetParams.btcnet)
if err != nil { if err != nil {
e := btcjson.Error{ e := btcjson.Error{
Code: btcjson.ErrInvalidAddressOrKey.Code, Code: btcjson.ErrInvalidAddressOrKey.Code,