From ca1113d0e2e394d4af8dbcc74df5ecdd377908f4 Mon Sep 17 00:00:00 2001 From: frrist Date: Thu, 14 Mar 2019 16:46:35 -0700 Subject: [PATCH] replace usage of address.Address{} with address.Undef --- abi/abi.go | 2 +- porcelain/message.go | 4 ++-- porcelain/miner.go | 2 +- testhelpers/consensus.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/abi/abi.go b/abi/abi.go index 6ad04e7927..fd86e0a0a4 100644 --- a/abi/abi.go +++ b/abi/abi.go @@ -144,7 +144,7 @@ func (av *Value) Serialize() ([]byte, error) { case Address: addr, ok := av.Val.(address.Address) if !ok { - return nil, &typeError{address.Address{}, av.Val} + return nil, &typeError{address.Undef, av.Val} } return addr.Bytes(), nil case AttoFIL: diff --git a/porcelain/message.go b/porcelain/message.go index 96f4295b00..7ab3f703eb 100644 --- a/porcelain/message.go +++ b/porcelain/message.go @@ -70,11 +70,11 @@ func GetAndMaybeSetDefaultSenderAddress(plumbing gamsdsaAPI) (address.Address, e addr := plumbing.WalletAddresses()[0] err := plumbing.ConfigSet("wallet.defaultAddress", addr.String()) if err != nil { - return address.Address{}, err + return address.Undef, err } return addr, nil } - return address.Address{}, ErrNoDefaultFromAddress + return address.Undef, ErrNoDefaultFromAddress } diff --git a/porcelain/miner.go b/porcelain/miner.go index 4a1330ac16..8e531d2729 100644 --- a/porcelain/miner.go +++ b/porcelain/miner.go @@ -213,7 +213,7 @@ func MinerGetOwnerAddress(ctx context.Context, plumbing mgoaAPI, minerAddr addre // MinerGetKey queries for the public key of the given miner func MinerGetKey(ctx context.Context, plumbing mgoaAPI, minerAddr address.Address) ([]byte, error) { - res, _, err := plumbing.MessageQuery(ctx, address.Address{}, minerAddr, "getKey") + res, _, err := plumbing.MessageQuery(ctx, address.Undef, minerAddr, "getKey") if err != nil { return []byte{}, err } diff --git a/testhelpers/consensus.go b/testhelpers/consensus.go index 1e45ec45af..80fa9a7062 100644 --- a/testhelpers/consensus.go +++ b/testhelpers/consensus.go @@ -190,7 +190,7 @@ func applyTestMessageWithAncestors(st state.Tree, store vm.StorageMap, msg *type } ta := newTestApplier() - return newMessageApplier(smsg, ta, st, store, bh, address.Address{}, ancestors) + return newMessageApplier(smsg, ta, st, store, bh, address.Undef, ancestors) } func newTestApplier() *consensus.DefaultProcessor {