-
Notifications
You must be signed in to change notification settings - Fork 199
/
argInterceptedDataFactory.go
60 lines (56 loc) · 2.51 KB
/
argInterceptedDataFactory.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
package factory
import (
"github.com/multiversx/mx-chain-core-go/core"
"github.com/multiversx/mx-chain-core-go/data/typeConverters"
"github.com/multiversx/mx-chain-core-go/hashing"
"github.com/multiversx/mx-chain-core-go/marshal"
crypto "github.com/multiversx/mx-chain-crypto-go"
"github.com/multiversx/mx-chain-go/common"
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/sharding"
"github.com/multiversx/mx-chain-go/sharding/nodesCoordinator"
)
// interceptedDataCoreComponentsHolder holds the core components required by the intercepted data factory
type interceptedDataCoreComponentsHolder interface {
InternalMarshalizer() marshal.Marshalizer
TxMarshalizer() marshal.Marshalizer
TxVersionChecker() process.TxVersionCheckerHandler
Hasher() hashing.Hasher
TxSignHasher() hashing.Hasher
Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
AddressPubKeyConverter() core.PubkeyConverter
ChainID() string
MinTransactionVersion() uint32
IsInterfaceNil() bool
HardforkTriggerPubKey() []byte
EnableEpochsHandler() common.EnableEpochsHandler
}
// interceptedDataCryptoComponentsHolder holds the crypto components required by the intercepted data factory
type interceptedDataCryptoComponentsHolder interface {
TxSignKeyGen() crypto.KeyGenerator
BlockSignKeyGen() crypto.KeyGenerator
TxSingleSigner() crypto.SingleSigner
BlockSigner() crypto.SingleSigner
GetMultiSigner(epoch uint32) (crypto.MultiSigner, error)
PublicKey() crypto.PublicKey
IsInterfaceNil() bool
}
// ArgInterceptedDataFactory holds all dependencies required by the shard and meta intercepted data factory in order to create
// new instances
type ArgInterceptedDataFactory struct {
CoreComponents interceptedDataCoreComponentsHolder
CryptoComponents interceptedDataCryptoComponentsHolder
ShardCoordinator sharding.Coordinator
NodesCoordinator nodesCoordinator.NodesCoordinator
FeeHandler process.FeeHandler
WhiteListerVerifiedTxs process.WhiteListHandler
HeaderSigVerifier process.InterceptedHeaderSigVerifier
ValidityAttester process.ValidityAttester
HeaderIntegrityVerifier process.HeaderIntegrityVerifier
EpochStartTrigger process.EpochStartTriggerHandler
ArgsParser process.ArgumentsParser
PeerSignatureHandler crypto.PeerSignatureHandler
SignaturesHandler process.SignaturesHandler
HeartbeatExpiryTimespanInSec int64
PeerID core.PeerID
}