-
Notifications
You must be signed in to change notification settings - Fork 199
/
argInterceptedDataFactory.go
54 lines (50 loc) · 2.14 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
package factory
import (
"github.com/ElrondNetwork/elrond-go-core/core"
"github.com/ElrondNetwork/elrond-go-core/data/typeConverters"
"github.com/ElrondNetwork/elrond-go-core/hashing"
"github.com/ElrondNetwork/elrond-go-core/marshal"
"github.com/ElrondNetwork/elrond-go-crypto"
"github.com/ElrondNetwork/elrond-go/process"
"github.com/ElrondNetwork/elrond-go/sharding"
)
// 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
EpochNotifier() process.EpochNotifier
}
// 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
MultiSigner() crypto.MultiSigner
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 sharding.NodesCoordinator
FeeHandler process.FeeHandler
WhiteListerVerifiedTxs process.WhiteListHandler
HeaderSigVerifier process.InterceptedHeaderSigVerifier
ValidityAttester process.ValidityAttester
HeaderIntegrityVerifier process.HeaderIntegrityVerifier
EpochStartTrigger process.EpochStartTriggerHandler
ArgsParser process.ArgumentsParser
EnableSignTxWithHashEpoch uint32
}