From 53483d084397af64c679f1a92eb5ed945e9298e5 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Tue, 18 Mar 2014 20:11:24 -0500 Subject: [PATCH] Rename DecodeAddr to DecodeAddress. Now that the deprecated DecodeAddress has been removed, rename DecodeAddr to DecodeAddress and remove the comment which warned this change was coming. --- address.go | 9 ++------- address_test.go | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/address.go b/address.go index bb59542..f410468 100644 --- a/address.go +++ b/address.go @@ -116,14 +116,9 @@ type Address interface { IsForNet(btcwire.BitcoinNet) bool } -// DecodeAddr decodes the string encoding of an address and returns +// DecodeAddress decodes the string encoding of an address and returns // the Address if addr is a valid encoding for a known address type. -// -// This is named DecodeAddr and not DecodeAddress due to DecodeAddress -// already being defined for an old api. When the old api is eventually -// removed, a proper DecodeAddress function will be added, and DecodeAddr -// will become deprecated. -func DecodeAddr(addr string) (Address, error) { +func DecodeAddress(addr string) (Address, error) { decoded := Base58Decode(addr) // Switch on decoded length to determine the type. diff --git a/address_test.go b/address_test.go index 4cf5293..439946f 100644 --- a/address_test.go +++ b/address_test.go @@ -489,7 +489,7 @@ func TestAddresses(t *testing.T) { var err error if test.canDecode { // Decode addr and compare error against valid. - decoded, err = btcutil.DecodeAddr(test.addr) + decoded, err = btcutil.DecodeAddress(test.addr) if (err == nil) != test.valid { t.Errorf("%v: decoding test failed", test.name) return