Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ctxc/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ func New(stack *node.Node, config *Config) (*Cortex, error) {
BloomCache: uint64(cacheLimit),
EventMux: ctxc.eventMux,
Whitelist: config.Whitelist,
Engine: ctxc.engine,
}
if ctxc.protocolManager, err = NewProtocolManager(c); err != nil {
return nil, err
Expand Down
4 changes: 1 addition & 3 deletions ctxc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"time"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/consensus"
"github.com/CortexFoundation/CortexTheseus/core"
"github.com/CortexFoundation/CortexTheseus/core/forkid"
"github.com/CortexFoundation/CortexTheseus/core/types"
Expand Down Expand Up @@ -105,7 +104,6 @@ type handlerConfig struct {
EventMux *event.TypeMux // Legacy event mux, deprecate for `feed`
Checkpoint *params.TrustedCheckpoint // Hard coded checkpoint for sync challenges
Whitelist map[uint64]common.Hash // Hard coded whitelist for sync challenged
Engine consensus.Engine
}

type ProtocolManager struct {
Expand Down Expand Up @@ -217,7 +215,7 @@ func NewProtocolManager(config *handlerConfig) (*ProtocolManager, error) {

// Construct the fetcher (short sync)
validator := func(header *types.Header) error {
return config.Engine.VerifyHeader(config.Chain, header, true)
return config.Chain.Engine().VerifyHeader(config.Chain, header, true)
}
heighter := func() uint64 {
return config.Chain.CurrentBlock().NumberU64()
Expand Down