mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
chg: set signer for bor
This commit is contained in:
parent
7fe2cd4384
commit
4c5f8153f1
3 changed files with 14 additions and 0 deletions
|
|
@ -473,6 +473,14 @@ func (s *Ethereum) StartMining(threads int) error {
|
|||
}
|
||||
clique.Authorize(eb, wallet.SignData)
|
||||
}
|
||||
if bor, ok := s.engine.(*bor.Bor); ok {
|
||||
wallet, err := s.accountManager.Find(accounts.Account{Address: eb})
|
||||
if wallet == nil || err != nil {
|
||||
log.Error("Etherbase account unavailable locally", "err", err)
|
||||
return fmt.Errorf("signer missing: %v", err)
|
||||
}
|
||||
bor.Authorize(eb, wallet.SignData)
|
||||
}
|
||||
// If mining is started, we can disable the transaction rejection mechanism
|
||||
// introduced to speed sync times.
|
||||
atomic.StoreUint32(&s.protocolManager.acceptTxs, 1)
|
||||
|
|
|
|||
|
|
@ -371,6 +371,8 @@ func (c *ChainConfig) String() string {
|
|||
engine = c.Ethash
|
||||
case c.Clique != nil:
|
||||
engine = c.Clique
|
||||
case c.Bor != nil:
|
||||
engine = c.Bor
|
||||
default:
|
||||
engine = "unknown"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@ var (
|
|||
accounts.MimetypeClique,
|
||||
0x02,
|
||||
}
|
||||
ApplicationBor = SigFormat{
|
||||
accounts.MimetypeBor,
|
||||
0x10,
|
||||
}
|
||||
TextPlain = SigFormat{
|
||||
accounts.MimetypeTextPlain,
|
||||
0x45,
|
||||
|
|
|
|||
Loading…
Reference in a new issue