From d9ef1c4b90120fc3cfe920bc18aa40b9c4c191b4 Mon Sep 17 00:00:00 2001 From: Nguyen Sy Thanh Son Date: Tue, 17 Apr 2018 07:38:49 +0000 Subject: [PATCH] correct test log --- contracts/validator/validator_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contracts/validator/validator_test.go b/contracts/validator/validator_test.go index db89b836ba..3d97e3c451 100644 --- a/contracts/validator/validator_test.go +++ b/contracts/validator/validator_test.go @@ -4,7 +4,6 @@ import ( "math/big" "testing" - "fmt" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" @@ -17,7 +16,7 @@ var ( addr = crypto.PubkeyToAddress(key.PublicKey) ) -func TestENS(t *testing.T) { +func TestValidator(t *testing.T) { contractBackend := backends.NewSimulatedBackend(core.GenesisAlloc{addr: {Balance: big.NewInt(1000000000)}}) transactOpts := bind.NewKeyedTransactor(key) @@ -31,6 +30,10 @@ func TestENS(t *testing.T) { if err != nil { t.Fatalf("can't get candidates: %v", err) } - fmt.Println("candidates", candidates) + t.Log("candidates", candidates) + for _, it := range candidates { + cap, _ := validator.GetCandidateCap(it) + t.Log("candidate", it.String(), "cap", cap) + } contractBackend.Commit() }