erigon-pulse/consensus/bor/statefull/processor.go

21 lines
454 B
Go
Raw Normal View History

package statefull
import (
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/consensus"
"github.com/ledgerwatch/erigon/core/types"
)
type ChainContext struct {
Chain consensus.ChainHeaderReader
Bor consensus.Engine
}
func (c ChainContext) Engine() consensus.Engine {
return c.Bor
}
func (c ChainContext) GetHeader(hash libcommon.Hash, number uint64) *types.Header {
return c.Chain.GetHeader(hash, number)
}