mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
correct test log
This commit is contained in:
parent
246d187294
commit
d9ef1c4b90
1 changed files with 6 additions and 3 deletions
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
|
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
@ -17,7 +16,7 @@ var (
|
||||||
addr = crypto.PubkeyToAddress(key.PublicKey)
|
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)}})
|
contractBackend := backends.NewSimulatedBackend(core.GenesisAlloc{addr: {Balance: big.NewInt(1000000000)}})
|
||||||
transactOpts := bind.NewKeyedTransactor(key)
|
transactOpts := bind.NewKeyedTransactor(key)
|
||||||
|
|
||||||
|
|
@ -31,6 +30,10 @@ func TestENS(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("can't get candidates: %v", err)
|
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()
|
contractBackend.Commit()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue