mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
21 lines
454 B
Go
21 lines
454 B
Go
|
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)
|
||
|
}
|