les/checkpointoracle: move oracle into its own package (#20508)
* les: move the checkpoint oracle into its own package It's first step of refactor LES package. LES package basically can be divided into LES client and LES server. However both sides will use checkpoint package for status retrieval and verification. So this PR moves checkpoint oracle into a separate package * les: address comments
This commit is contained in:
committed by
Péter Szilágyi
parent
35f95aef6f
commit
c6285e6437
@ -36,6 +36,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/eth/gasprice"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||
"github.com/ethereum/go-ethereum/les/checkpointoracle"
|
||||
"github.com/ethereum/go-ethereum/light"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/node"
|
||||
@ -123,7 +124,7 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) {
|
||||
if oracle == nil {
|
||||
oracle = params.CheckpointOracles[genesisHash]
|
||||
}
|
||||
leth.oracle = newCheckpointOracle(oracle, leth.localCheckpoint)
|
||||
leth.oracle = checkpointoracle.New(oracle, leth.localCheckpoint)
|
||||
|
||||
// Note: AddChildIndexer starts the update process for the child
|
||||
leth.bloomIndexer.AddChildIndexer(leth.bloomTrieIndexer)
|
||||
@ -275,5 +276,5 @@ func (s *LightEthereum) SetContractBackend(backend bind.ContractBackend) {
|
||||
if s.oracle == nil {
|
||||
return
|
||||
}
|
||||
s.oracle.start(backend)
|
||||
s.oracle.Start(backend)
|
||||
}
|
||||
|
Reference in New Issue
Block a user