mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
correct chain, header params
This commit is contained in:
parent
304f116b0d
commit
f1cf546def
3 changed files with 2 additions and 3 deletions
|
|
@ -295,7 +295,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
||||||
if ok, err := ethereum.ValidateMiner(); err != nil {
|
if ok, err := ethereum.ValidateMiner(); err != nil {
|
||||||
utils.Fatalf("Can't verify validator permission: %v", err)
|
utils.Fatalf("Can't verify validator permission: %v", err)
|
||||||
} else if !ok {
|
} 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
|
// Use a reduced number of threads if requested
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
"github.com/ethereum/go-ethereum/crypto/sha3"
|
"github.com/ethereum/go-ethereum/crypto/sha3"
|
||||||
"github.com/ethereum/go-ethereum/eth"
|
|
||||||
"github.com/ethereum/go-ethereum/ethdb"
|
"github.com/ethereum/go-ethereum/ethdb"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/ethereum/go-ethereum/log"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ func (s *Ethereum) ValidateMiner() (bool, error) {
|
||||||
return false, fmt.Errorf("Only verify miners in Clique protocol")
|
return false, fmt.Errorf("Only verify miners in Clique protocol")
|
||||||
} else {
|
} else {
|
||||||
//check if miner's wallet is in set of validators
|
//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 {
|
if err != nil {
|
||||||
return false, fmt.Errorf("Can't verify miner: %v", err)
|
return false, fmt.Errorf("Can't verify miner: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue