mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 12:01:20 +00:00
a4f8175136
Updated bor consensus folder structure
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)
|
|
}
|