From e3826a2f4502fbd7b5dcbd019d593aeddf0c5c09 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 23 Feb 2017 20:50:20 -0500 Subject: [PATCH] use default vals for new accounts --- state/state_test.go | 5 ++--- types/account_test.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/state/state_test.go b/state/state_test.go index 6eae18de9..8c7416219 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -21,9 +21,8 @@ func TestState(t *testing.T) { //Account and address for tests dumAddr := []byte("dummyAddress") - acc := &types.Account{ - Sequence: 1, - } + acc := new(types.Account) + acc.Sequence = 1 //reset the store/state/cache reset := func() { diff --git a/types/account_test.go b/types/account_test.go index 77dfba9d8..5a9118f1d 100644 --- a/types/account_test.go +++ b/types/account_test.go @@ -8,7 +8,7 @@ import ( func TestNilAccount(t *testing.T) { - acc := Account{} + var acc Account //test Copy accCopy := acc.Copy()