mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 10:20:44 +00:00
allow signing with m1 = m2
This commit is contained in:
parent
85db85cc20
commit
a47c0b94e7
1 changed files with 7 additions and 1 deletions
|
|
@ -977,7 +977,13 @@ func (c *XDPoS) Seal(chain consensus.ChainReader, block *types.Block, stop <-cha
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
copy(header.Extra[len(header.Extra)-extraSeal:], sighash)
|
copy(header.Extra[len(header.Extra)-extraSeal:], sighash)
|
||||||
|
m2, err := c.GetValidator(signer, chain, header)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("can't get block validator: %v", err)
|
||||||
|
}
|
||||||
|
if m2 == signer {
|
||||||
|
header.Validator = sighash
|
||||||
|
}
|
||||||
return block.WithSeal(header), nil
|
return block.WithSeal(header), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue