erigon-pulse/consensus/aura/unassemble.go
Somnath Banerjee 71231140a5
Block Gas limit contract integration for Chiado (#7727)
Changes summary:
- Continue with the gasLimit check skip in ``verifyHeader`` of
``merge.go`` for unless pre-merge block and blockGasLimitContract
present
- Refactor ``aura.go`` a bit
- Have ``sysCall`` method customized to be able to call state (contract)
at a parent (or any other) header state
2023-06-19 22:06:51 +05:30

35 lines
745 B
Go

package aura
import (
"container/list"
libcommon "github.com/ledgerwatch/erigon-lib/common"
)
// nolint
type unAssembledHeader struct {
hash libcommon.Hash
number uint64
signers []libcommon.Address
}
type unAssembledHeaders struct {
l *list.List
}
func (u unAssembledHeaders) PushBack(header *unAssembledHeader) { u.l.PushBack(header) }
func (u unAssembledHeaders) PushFront(header *unAssembledHeader) { u.l.PushFront(header) }
func (u unAssembledHeaders) Pop() *unAssembledHeader {
e := u.l.Front()
if e == nil {
return nil
}
u.l.Remove(e)
return e.Value.(*unAssembledHeader)
}
func (u unAssembledHeaders) Front() *unAssembledHeader {
e := u.l.Front()
if e == nil {
return nil
}
return e.Value.(*unAssembledHeader)
}