You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tapcfg/config.go
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ import (
31
31
"github.com/lightningnetwork/lnd/signal"
32
32
"github.com/lightningnetwork/lnd/tor"
33
33
"golang.org/x/net/http2"
34
+
"golang.org/x/time/rate"
34
35
"google.golang.org/grpc"
35
36
"google.golang.org/grpc/credentials"
36
37
)
@@ -113,6 +114,16 @@ const (
113
114
// defaultReOrgSafeDepth is the default number of confirmations we'll
114
115
// wait for before considering a transaction safely buried in the chain.
115
116
defaultReOrgSafeDepth=6
117
+
118
+
// defaultUniverseMaxQps is the default maximum number of queries per
119
+
// second for the universe server. This permis 100 queries per second
120
+
// by default.
121
+
defaultUniverseMaxQps=100
122
+
123
+
// defaultUniverseQueriesBurst is the default burst budget for the
124
+
// universe queries. By default we'll allow 100 qps, with a max burst
125
+
// of 10 queries.
126
+
defaultUniverseQueriesBurst=10
116
127
)
117
128
118
129
var (
@@ -251,6 +262,12 @@ type UniverseConfig struct {
251
262
FederationServers []string`long:"federationserver" description:"The host:port of a Universe server peer with. These servers will be added as the default set of federation servers. Can be specified multiple times."`
252
263
253
264
PublicAccessbool`long:"public-access" description:"If true, and the Universe server is on a public interface, valid proof from remote parties will be accepted, and proofs will be queryable by remote parties. This applies to federation syncing as well as RPC insert and query."`
265
+
266
+
StatsCacheDuration time.Duration`long:"stats-cache-duration" description:"The amount of time to cache stats for before refreshing them."`
267
+
268
+
UniverseQueriesPerSecond rate.Limit`long:"max-qps" description:"The maximum number of queries per second across the set of active universe queries that is permitted. Anything above this starts to get rate limited."`
269
+
270
+
UniverseQueriesBurstint`long:"req-burst-budget" description:"The burst budget for the universe query rate limiting."`
254
271
}
255
272
256
273
// AddressConfig is the config that houses any address Book related config
0 commit comments