mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 08:53:46 +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)
|
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
|
// If mining is started, we can disable the transaction rejection mechanism
|
||||||
// introduced to speed sync times.
|
// introduced to speed sync times.
|
||||||
atomic.StoreUint32(&s.protocolManager.acceptTxs, 1)
|
atomic.StoreUint32(&s.protocolManager.acceptTxs, 1)
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,8 @@ func (c *ChainConfig) String() string {
|
||||||
engine = c.Ethash
|
engine = c.Ethash
|
||||||
case c.Clique != nil:
|
case c.Clique != nil:
|
||||||
engine = c.Clique
|
engine = c.Clique
|
||||||
|
case c.Bor != nil:
|
||||||
|
engine = c.Bor
|
||||||
default:
|
default:
|
||||||
engine = "unknown"
|
engine = "unknown"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ var (
|
||||||
accounts.MimetypeClique,
|
accounts.MimetypeClique,
|
||||||
0x02,
|
0x02,
|
||||||
}
|
}
|
||||||
|
ApplicationBor = SigFormat{
|
||||||
|
accounts.MimetypeBor,
|
||||||
|
0x10,
|
||||||
|
}
|
||||||
TextPlain = SigFormat{
|
TextPlain = SigFormat{
|
||||||
accounts.MimetypeTextPlain,
|
accounts.MimetypeTextPlain,
|
||||||
0x45,
|
0x45,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue