mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-23 07:04:35 +00:00
updated backend.go
This commit is contained in:
parent
8fd30116d5
commit
d7f57b92e3
1 changed files with 1 additions and 11 deletions
|
|
@ -334,6 +334,7 @@ func (self *Ethereum) SetEtherbase(etherbase common.Address) {
|
|||
self.miner.SetEtherbase(etherbase)
|
||||
}
|
||||
|
||||
// ValidateMiner checks if node's address is in set of validators
|
||||
func (s *Ethereum) ValidateMiner() (bool, error) {
|
||||
eb, err := s.Etherbase()
|
||||
if err != nil {
|
||||
|
|
@ -353,20 +354,9 @@ func (s *Ethereum) ValidateMiner() (bool, error) {
|
|||
} else {
|
||||
return false, fmt.Errorf("Only verify miners in Clique protocol")
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (s *Ethereum) Checkpoint() bool {
|
||||
number := s.blockchain.CurrentHeader().Number.Uint64()
|
||||
return number%s.chainConfig.Clique.Epoch == 1 || number == 0
|
||||
}
|
||||
|
||||
func (s *Ethereum) Checkpoint() bool {
|
||||
number := s.blockchain.CurrentHeader().Number.Uint64()
|
||||
return number%s.chainConfig.Clique.Epoch == 1
|
||||
}
|
||||
|
||||
func (s *Ethereum) StartMining(local bool) error {
|
||||
eb, err := s.Etherbase()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue