-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathconfig.go
87 lines (69 loc) · 1.76 KB
/
config.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
package types
import "time"
type TransactionManagerChainConfig interface {
BroadcasterChainConfig
ConfirmerChainConfig
ReaperChainConfig
}
type TransactionManagerFeeConfig interface {
BroadcasterFeeConfig
ConfirmerFeeConfig
}
type TransactionManagerTransactionsConfig interface {
BroadcasterTransactionsConfig
ConfirmerTransactionsConfig
ResenderTransactionsConfig
ReaperTransactionsConfig
ForwardersEnabled() bool
MaxQueued() uint64
}
type BroadcasterChainConfig interface {
IsL2() bool
}
type BroadcasterFeeConfig interface {
MaxFeePrice() string // logging value
FeePriceDefault() string // logging value
}
type BroadcasterTransactionsConfig interface {
MaxInFlight() uint32
}
type BroadcasterListenerConfig interface {
FallbackPollInterval() time.Duration
}
type ConfirmerFeeConfig interface {
BumpTxDepth() uint32
LimitDefault() uint64
// from gas.Config
BumpThreshold() uint64
MaxFeePrice() string // logging value
BumpPercent() uint16
}
type ConfirmerChainConfig interface {
RPCDefaultBatchSize() uint32
FinalityDepth() uint32
}
type ConfirmerDatabaseConfig interface {
// from pg.QConfig
DefaultQueryTimeout() time.Duration
}
type ConfirmerTransactionsConfig interface {
MaxInFlight() uint32
ForwardersEnabled() bool
}
type ResenderChainConfig interface {
RPCDefaultBatchSize() uint32
}
type ResenderTransactionsConfig interface {
ResendAfterThreshold() time.Duration
MaxInFlight() uint32
}
// ReaperConfig is the config subset used by the reaper
//
//go:generate mockery --quiet --name ReaperChainConfig --structname ReaperConfig --output ./mocks/ --case=underscore
type ReaperChainConfig interface {
FinalityDepth() uint32
}
type ReaperTransactionsConfig interface {
ReaperInterval() time.Duration
ReaperThreshold() time.Duration
}