-
Notifications
You must be signed in to change notification settings - Fork 199
/
argProcessor.go
95 lines (86 loc) · 3.52 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
package block
import (
"github.com/ElrondNetwork/elrond-go/cmd/node/factory"
"github.com/ElrondNetwork/elrond-go/config"
"github.com/ElrondNetwork/elrond-go/consensus"
"github.com/ElrondNetwork/elrond-go/core"
"github.com/ElrondNetwork/elrond-go/core/dblookupext"
"github.com/ElrondNetwork/elrond-go/core/statistics"
"github.com/ElrondNetwork/elrond-go/data"
"github.com/ElrondNetwork/elrond-go/data/state"
"github.com/ElrondNetwork/elrond-go/data/typeConverters"
"github.com/ElrondNetwork/elrond-go/dataRetriever"
"github.com/ElrondNetwork/elrond-go/hashing"
"github.com/ElrondNetwork/elrond-go/marshal"
"github.com/ElrondNetwork/elrond-go/process"
"github.com/ElrondNetwork/elrond-go/sharding"
)
type coreComponentsHolder interface {
Hasher() hashing.Hasher
InternalMarshalizer() marshal.Marshalizer
Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
RoundHandler() consensus.RoundHandler
StatusHandler() core.AppStatusHandler
IsInterfaceNil() bool
}
type dataComponentsHolder interface {
StorageService() dataRetriever.StorageService
Datapool() dataRetriever.PoolsHolder
Blockchain() data.ChainHandler
IsInterfaceNil() bool
}
type bootstrapComponentsHolder interface {
ShardCoordinator() sharding.Coordinator
HeaderIntegrityVerifier() factory.HeaderIntegrityVerifierHandler
IsInterfaceNil() bool
}
type statusComponentsHolder interface {
ElasticIndexer() process.Indexer
TpsBenchmark() statistics.TPSBenchmark
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
Config config.Config
AccountsDB map[state.AccountsDbIdentifier]state.AccountsAdapter
ForkDetector process.ForkDetector
NodesCoordinator sharding.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
EpochNotifier process.EpochNotifier
VMContainersFactory process.VirtualMachinesContainerFactory
VmContainer process.VirtualMachinesContainer
}
// 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
RewardsV2EnableEpoch uint32
}