From f01459c30e5a41e91cd2b63bd403b63e2ca6b478 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 26 Feb 2014 14:06:48 -0600 Subject: [PATCH] Update for recent btcutil Addr interface changes. --- rpcserver.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 450a7abc..c8f002af 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -539,16 +539,13 @@ func handleCreateRawTransaction(s *rpcServer, cmd btcjson.Cmd) (interface{}, err // Ensure the address is one of the supported types and that // the network encoded with the address matches the network the // server is currently on. - net := s.server.btcnet - switch addr := addr.(type) { + switch addr.(type) { case *btcutil.AddressPubKeyHash: - net = addr.Net() case *btcutil.AddressScriptHash: - net = addr.Net() default: return nil, btcjson.ErrInvalidAddressOrKey } - if net != s.server.btcnet { + if !addr.IsForNet(s.server.btcnet) { return nil, btcjson.Error{ Code: btcjson.ErrInvalidAddressOrKey.Code, Message: fmt.Sprintf("%s: %q",