From f1cf546defec332deb47232b3635bb3b32263bec Mon Sep 17 00:00:00 2001 From: Tuna Date: Tue, 15 May 2018 10:54:52 +0700 Subject: [PATCH] correct chain, header params --- cmd/tomo/main.go | 2 +- consensus/clique/clique.go | 1 - eth/backend.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/tomo/main.go b/cmd/tomo/main.go index 03b8099dc75e..f5c397310cd0 100644 --- a/cmd/tomo/main.go +++ b/cmd/tomo/main.go @@ -295,7 +295,7 @@ func startNode(ctx *cli.Context, stack *node.Node) { if ok, err := ethereum.ValidateMiner(); err != nil { utils.Fatalf("Can't verify validator permission: %v", err) } else if !ok { - utils.Fatalf("Only validators can mine blocks") + utils.Fatalf("Only validator can mine blocks") } // Use a reduced number of threads if requested diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index ecf7ef626251..1157ab00a32a 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -34,7 +34,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/sha3" - "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" diff --git a/eth/backend.go b/eth/backend.go index 9d31475b07b0..11e95c1d7455 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -343,7 +343,7 @@ func (s *Ethereum) ValidateMiner() (bool, error) { return false, fmt.Errorf("Only verify miners in Clique protocol") } else { //check if miner's wallet is in set of validators - snap, err := c.GetSnapshot(chain, header) + snap, err := c.GetSnapshot(s.blockchain, s.blockchain.CurrentHeader()) if err != nil { return false, fmt.Errorf("Can't verify miner: %v", err) }