nit to trigger CI
Some checks failed
Tests / Run integration tests (pull_request) Failing after 3h8m50s

This commit is contained in:
Roy Crihfield 2023-09-02 19:44:39 +08:00
parent b91e854974
commit e00045cd70

View File

@ -41,7 +41,7 @@ const defaultQueueSize = 1024
// Service is the underlying struct for the state diffing service // Service is the underlying struct for the state diffing service
type Service struct { type Service struct {
// Used to build the state diff objects // Used to build the state diff objects
Builder statediff.Builder builder statediff.Builder
// Used to read data from LevelDB // Used to read data from LevelDB
lvlDBReader Reader lvlDBReader Reader
// Used to signal shutdown of the service // Used to signal shutdown of the service
@ -65,7 +65,7 @@ func NewStateDiffService(lvlDBReader Reader, indexer interfaces.StateDiffIndexer
} }
return &Service{ return &Service{
lvlDBReader: lvlDBReader, lvlDBReader: lvlDBReader,
Builder: builder, builder: builder,
indexer: indexer, indexer: indexer,
workers: conf.ServiceWorkers, workers: conf.ServiceWorkers,
queue: make(chan RangeRequest, conf.WorkerQueueSize), queue: make(chan RangeRequest, conf.WorkerQueueSize),
@ -267,7 +267,7 @@ func (sds *Service) StateDiffFor(blockHash common.Hash, params statediff.Params)
// processStateDiff method builds the state diff payload from the current block, parent state root, and provided params // processStateDiff method builds the state diff payload from the current block, parent state root, and provided params
func (sds *Service) processStateDiff(currentBlock *types.Block, parentRoot common.Hash, params statediff.Params) (*statediff.Payload, error) { func (sds *Service) processStateDiff(currentBlock *types.Block, parentRoot common.Hash, params statediff.Params) (*statediff.Payload, error) {
stateDiff, err := sds.Builder.BuildStateDiffObject(statediff.Args{ stateDiff, err := sds.builder.BuildStateDiffObject(statediff.Args{
BlockHash: currentBlock.Hash(), BlockHash: currentBlock.Hash(),
BlockNumber: currentBlock.Number(), BlockNumber: currentBlock.Number(),
OldStateRoot: parentRoot, OldStateRoot: parentRoot,
@ -413,7 +413,7 @@ func (sds *Service) writeStateDiff(block *types.Block, parentRoot common.Hash, p
} }
prom.SetTimeMetric(prom.T_BLOCK_PROCESSING, time.Now().Sub(t)) prom.SetTimeMetric(prom.T_BLOCK_PROCESSING, time.Now().Sub(t))
t = time.Now() t = time.Now()
err = sds.Builder.WriteStateDiff(statediff.Args{ err = sds.builder.WriteStateDiff(statediff.Args{
NewStateRoot: block.Root(), NewStateRoot: block.Root(),
OldStateRoot: parentRoot, OldStateRoot: parentRoot,
BlockNumber: block.Number(), BlockNumber: block.Number(),