mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
commit
f78b974b9a
2 changed files with 11 additions and 3 deletions
|
|
@ -240,9 +240,17 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
return block, false, fmt.Errorf("can't get block validator: %v", err)
|
return block, false, fmt.Errorf("can't get block validator: %v", err)
|
||||||
}
|
}
|
||||||
if m2 == eb {
|
if m2 == eb {
|
||||||
wallet, _ := eth.accountManager.Find(accounts.Account{Address: eb})
|
wallet, err := eth.accountManager.Find(accounts.Account{Address: eb})
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Can't find coinbase account wallet", "err", err)
|
||||||
|
return block, false, err
|
||||||
|
}
|
||||||
header := block.Header()
|
header := block.Header()
|
||||||
sighash, _ := wallet.SignHash(accounts.Account{Address: eb}, posv.SigHash(header).Bytes())
|
sighash, err := wallet.SignHash(accounts.Account{Address: eb}, posv.SigHash(header).Bytes())
|
||||||
|
if err != nil || sighash == nil {
|
||||||
|
log.Error("Can't get signature hash of m2", "sighash", sighash, "err", err)
|
||||||
|
return block, false, err
|
||||||
|
}
|
||||||
header.Validator = sighash
|
header.Validator = sighash
|
||||||
return types.NewBlockWithHeader(header).WithBody(block.Transactions(), block.Uncles()), true, nil
|
return types.NewBlockWithHeader(header).WithBody(block.Transactions(), block.Uncles()), true, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 1 // Major version component of the current release
|
VersionMajor = 1 // Major version component of the current release
|
||||||
VersionMinor = 3 // Minor version component of the current release
|
VersionMinor = 3 // Minor version component of the current release
|
||||||
VersionPatch = 0 // Patch version component of the current release
|
VersionPatch = 1 // Patch version component of the current release
|
||||||
VersionMeta = "stable" // Version metadata to append to the version string
|
VersionMeta = "stable" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue