-
Notifications
You must be signed in to change notification settings - Fork 197
/
argProcessor.go
111 lines (101 loc) · 4.48 KB
/
argProcessor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
package block
import (
"github.com/ElrondNetwork/elrond-go-core/core"
"github.com/ElrondNetwork/elrond-go-core/data"
"github.com/ElrondNetwork/elrond-go-core/data/typeConverters"
"github.com/ElrondNetwork/elrond-go-core/hashing"
"github.com/ElrondNetwork/elrond-go-core/marshal"
nodeFactory "github.com/ElrondNetwork/elrond-go/cmd/node/factory"
"github.com/ElrondNetwork/elrond-go/common"
"github.com/ElrondNetwork/elrond-go/config"
"github.com/ElrondNetwork/elrond-go/consensus"
"github.com/ElrondNetwork/elrond-go/dataRetriever"
"github.com/ElrondNetwork/elrond-go/dblookupext"
"github.com/ElrondNetwork/elrond-go/outport"
"github.com/ElrondNetwork/elrond-go/process"
"github.com/ElrondNetwork/elrond-go/sharding"
"github.com/ElrondNetwork/elrond-go/sharding/nodesCoordinator"
"github.com/ElrondNetwork/elrond-go/state"
)
type coreComponentsHolder interface {
Hasher() hashing.Hasher
InternalMarshalizer() marshal.Marshalizer
Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
EpochNotifier() process.EpochNotifier
EnableEpochsHandler() common.EnableEpochsHandler
RoundHandler() consensus.RoundHandler
EconomicsData() process.EconomicsDataHandler
ProcessStatusHandler() common.ProcessStatusHandler
IsInterfaceNil() bool
}
type dataComponentsHolder interface {
StorageService() dataRetriever.StorageService
Datapool() dataRetriever.PoolsHolder
Blockchain() data.ChainHandler
IsInterfaceNil() bool
}
type bootstrapComponentsHolder interface {
ShardCoordinator() sharding.Coordinator
VersionedHeaderFactory() nodeFactory.VersionedHeaderFactory
HeaderIntegrityVerifier() nodeFactory.HeaderIntegrityVerifierHandler
IsInterfaceNil() bool
}
type statusComponentsHolder interface {
OutportHandler() outport.OutportHandler
IsInterfaceNil() bool
}
type statusCoreComponentsHolder interface {
AppStatusHandler() core.AppStatusHandler
IsInterfaceNil() bool
}
// ArgBaseProcessor holds all dependencies required by the process data factory in order to create
// new instances
type ArgBaseProcessor struct {
CoreComponents coreComponentsHolder
DataComponents dataComponentsHolder
BootstrapComponents bootstrapComponentsHolder
StatusComponents statusComponentsHolder
StatusCoreComponents statusCoreComponentsHolder
Config config.Config
AccountsDB map[state.AccountsDbIdentifier]state.AccountsAdapter
ForkDetector process.ForkDetector
NodesCoordinator nodesCoordinator.NodesCoordinator
FeeHandler process.TransactionFeeHandler
RequestHandler process.RequestHandler
BlockChainHook process.BlockChainHookHandler
TxCoordinator process.TransactionCoordinator
EpochStartTrigger process.EpochStartTriggerHandler
HeaderValidator process.HeaderConstructionValidator
BootStorer process.BootStorer
BlockTracker process.BlockTracker
BlockSizeThrottler process.BlockSizeThrottler
Version string
HistoryRepository dblookupext.HistoryRepository
EnableRoundsHandler process.EnableRoundsHandler
VMContainersFactory process.VirtualMachinesContainerFactory
VmContainer process.VirtualMachinesContainer
GasHandler gasConsumedProvider
OutportDataProvider outport.DataProviderOutport
ScheduledTxsExecutionHandler process.ScheduledTxsExecutionHandler
ScheduledMiniBlocksEnableEpoch uint32
ProcessedMiniBlocksTracker process.ProcessedMiniBlocksTracker
ReceiptsRepository receiptsRepository
}
// ArgShardProcessor holds all dependencies required by the process data factory in order to create
// new instances of shard processor
type ArgShardProcessor struct {
ArgBaseProcessor
}
// ArgMetaProcessor holds all dependencies required by the process data factory in order to create
// new instances of meta processor
type ArgMetaProcessor struct {
ArgBaseProcessor
PendingMiniBlocksHandler process.PendingMiniBlocksHandler
SCToProtocol process.SmartContractToProtocolHandler
EpochStartDataCreator process.EpochStartDataCreator
EpochEconomics process.EndOfEpochEconomics
EpochRewardsCreator process.RewardsCreator
EpochValidatorInfoCreator process.EpochStartValidatorInfoCreator
EpochSystemSCProcessor process.EpochStartSystemSCProcessor
ValidatorStatisticsProcessor process.ValidatorStatisticsProcessor
}