mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
Merge pull request #1049 from maticnetwork/shivam/POS-1733-2
chg : withdrawals check in bor consensus
This commit is contained in:
commit
f9577555aa
1 changed files with 14 additions and 0 deletions
|
|
@ -816,6 +816,16 @@ func (c *Bor) Finalize(chain consensus.ChainHeaderReader, header *types.Header,
|
|||
|
||||
headerNumber := header.Number.Uint64()
|
||||
|
||||
if len(withdrawals) > 0 {
|
||||
log.Error("Bor does not support withdrawals", "number", headerNumber)
|
||||
return
|
||||
}
|
||||
|
||||
if header.WithdrawalsHash != nil {
|
||||
log.Error("Bor does not support withdrawalHash", "number", headerNumber)
|
||||
return
|
||||
}
|
||||
|
||||
if IsSprintStart(headerNumber, c.config.CalculateSprint(headerNumber)) {
|
||||
ctx := context.Background()
|
||||
cx := statefull.ChainContext{Chain: chain, Bor: c}
|
||||
|
|
@ -892,6 +902,10 @@ func (c *Bor) FinalizeAndAssemble(ctx context.Context, chain consensus.ChainHead
|
|||
return nil, errors.New("Bor does not support withdrawals")
|
||||
}
|
||||
|
||||
if header.WithdrawalsHash != nil {
|
||||
return nil, errors.New("Bor does not support withdrawalHash")
|
||||
}
|
||||
|
||||
stateSyncData := []*types.StateSyncData{}
|
||||
|
||||
headerNumber := header.Number.Uint64()
|
||||
|
|
|
|||
Loading…
Reference in a new issue