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: proof/courier.go
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -545,6 +545,8 @@ func (e *BackoffExecError) Error() string {
545
545
}
546
546
547
547
// BackoffCfg configures the behaviour of the proof delivery backoff procedure.
548
+
//
549
+
// nolint:lll
548
550
typeBackoffCfgstruct {
549
551
// SkipInitDelay is a flag that indicates whether we should skip the
550
552
// initial delay before attempting to deliver the proof to the receiver
@@ -553,19 +555,19 @@ type BackoffCfg struct {
553
555
554
556
// BackoffResetWait is the amount of time we'll wait before
555
557
// resetting the backoff counter to its initial state.
556
-
BackoffResetWait time.Duration`long:"backoffresetwait" description:"The amount of time to wait before resetting the backoff counter."`
558
+
BackoffResetWait time.Duration`long:"backoffresetwait" description:"The amount of time to wait before resetting the backoff counter. Valid time units are {s, m, h}."`
557
559
558
560
// NumTries is the number of times we'll try to deliver the proof to the
559
561
// receiver before the BackoffResetWait delay is enforced.
560
562
NumTriesint`long:"numtries" description:"The number of proof delivery attempts before the backoff counter is reset."`
561
563
562
564
// InitialBackoff is the initial backoff time we'll use to wait before
563
565
// retrying to deliver the proof to the receiver.
564
-
InitialBackoff time.Duration`long:"initialbackoff" description:"The initial backoff time to wait before retrying to deliver the proof to the receiver."`
566
+
InitialBackoff time.Duration`long:"initialbackoff" description:"The initial backoff time to wait before retrying to deliver the proof to the receiver. Valid time units are {s, m, h}."`
565
567
566
568
// MaxBackoff is the maximum backoff time we'll use to wait before
567
569
// retrying to deliver the proof to the receiver.
568
-
MaxBackoff time.Duration`long:"maxbackoff" description:"The maximum backoff time to wait before retrying to deliver the proof to the receiver."`
570
+
MaxBackoff time.Duration`long:"maxbackoff" description:"The maximum backoff time to wait before retrying to deliver the proof to the receiver. Valid time units are {s, m, h}."`
569
571
}
570
572
571
573
// BackoffHandler is a handler for the backoff procedure.
// HashMailCourierCfg is the config for the hashmail proof courier.
760
+
//
761
+
// nolint:lll
758
762
typeHashMailCourierCfgstruct {
759
763
// ReceiverAckTimeout is the maximum time we'll wait for the receiver to
760
764
// acknowledge the proof.
761
-
ReceiverAckTimeout time.Duration`long:"receiveracktimeout" description:"The maximum time to wait for the receiver to acknowledge the proof."`
765
+
ReceiverAckTimeout time.Duration`long:"receiveracktimeout" description:"The maximum time to wait for the receiver to acknowledge the proof. Valid time units are {s, m, h}."`
762
766
763
767
// BackoffCfg configures the behaviour of the proof delivery
Copy file name to clipboardExpand all lines: tapcfg/config.go
+16-11Lines changed: 16 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
// nolint:lll
1
2
package tapcfg
2
3
3
4
import (
@@ -130,6 +131,10 @@ const (
130
131
// waits having identified an asset transfer on-chain and before
131
132
// retrieving the corresponding proof via the proof courier service.
132
133
defaultProofRetrievalDelay=5*time.Second
134
+
135
+
// defaultLndRPCTimeout is the default timeout we'll use for RPC
136
+
// requests to lnd.
137
+
defaultLndRPCTimeout=1*time.Minute
133
138
)
134
139
135
140
var (
@@ -220,12 +225,12 @@ type RpcConfig struct {
220
225
TLSExtraDomains []string`long:"tlsextradomain" description:"Adds an extra domain to the generated certificate"`
221
226
TLSAutoRefreshbool`long:"tlsautorefresh" description:"Re-generate TLS certificate and key if the IPs or domains are changed"`
222
227
TLSDisableAutofillbool`long:"tlsdisableautofill" description:"Do not include the interface IPs or the system hostname in TLS certificate, use first --tlsextradomain as Common Name instead, if set"`
223
-
TLSCertDuration time.Duration`long:"tlscertduration" description:"The duration for which the auto-generated TLS certificate will be valid for"`
228
+
TLSCertDuration time.Duration`long:"tlscertduration" description:"The duration for which the auto-generated TLS certificate will be valid for. Valid time units are {s, m, h}."`
DisableRestTLSbool`long:"no-rest-tls" description:"Disable TLS for REST connections"`
227
-
WSPingInterval time.Duration`long:"ws-ping-interval" description:"The ping interval for REST based WebSocket connections, set to 0 to disable sending ping messages from the server side"`
228
-
WSPongWait time.Duration`long:"ws-pong-wait" description:"The time we wait for a pong response message on REST based WebSocket connections before the connection is closed as inactive"`
232
+
WSPingInterval time.Duration`long:"ws-ping-interval" description:"The ping interval for REST based WebSocket connections, set to 0 to disable sending ping messages from the server side. Valid time units are {s, m, h}."`
233
+
WSPongWait time.Duration`long:"ws-pong-wait" description:"The time we wait for a pong response message on REST based WebSocket connections before the connection is closed as inactive. Valid time units are {s, m, h}."`
229
234
230
235
MacaroonPathstring`long:"macaroonpath" description:"Path to write the admin macaroon for tapd's RPC and REST services if it doesn't exist"`
231
236
NoMacaroonsbool`long:"no-macaroons" description:"Disable macaroon authentication, can only be used if server is not listening on a public interface."`
@@ -258,22 +263,23 @@ type LndConfig struct {
258
263
MacaroonPathstring`long:"macaroonpath" description:"The full path to the single macaroon to use, either the admin.macaroon or a custom baked one. Cannot be specified at the same time as macaroondir. A custom macaroon must contain ALL permissions required for all subservers to work, otherwise permission errors will occur."`
259
264
260
265
TLSPathstring`long:"tlspath" description:"Path to lnd tls certificate"`
266
+
267
+
// RPCTimeout is the timeout we'll use for RPC requests to lnd.
268
+
RPCTimeout time.Duration`long:"rpctimeout" description:"The timeout to use for RPC requests to lnd; a sufficiently long duration should be chosen to avoid issues with slow responses. Valid time units are {s, m, h}."`
261
269
}
262
270
263
271
// UniverseConfig is the config that houses any Universe related config
264
272
// values.
265
-
//
266
-
// nolint: lll
267
273
typeUniverseConfigstruct {
268
-
SyncInterval time.Duration`long:"syncinterval" description:"Amount of time to wait between universe syncs"`
274
+
SyncInterval time.Duration`long:"syncinterval" description:"Amount of time to wait between universe syncs. Valid time units are {s, m, h}."`
269
275
270
276
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."`
271
277
272
278
SyncAllAssetsbool`long:"sync-all-assets" description:"If set, the federation syncer will default to syncing all assets."`
273
279
274
280
PublicAccessstring`long:"public-access" description:"The public access mode for the universe server, controlling whether remote parties can read from and/or write to this universe server over RPC if exposed to a public network interface. This can be unset, 'r', 'w', or 'rw'. If unset, public access is not enabled for the universe server. If 'r' is included, public access is allowed for read-only endpoints. If 'w' is included, public access is allowed for write endpoints."`
275
281
276
-
StatsCacheDuration time.Duration`long:"stats-cache-duration" description:"The amount of time to cache stats for before refreshing them."`
282
+
StatsCacheDuration time.Duration`long:"stats-cache-duration" description:"The amount of time to cache stats for before refreshing them. Valid time units are {s, m, h}."`
277
283
278
284
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."`
CustodianProofRetrievalDelay time.Duration`long:"custodianproofretrievaldelay" description:"The number of seconds the custodian waits after identifying an asset transfer on-chain and before retrieving the corresponding proof."`
329
+
CustodianProofRetrievalDelay time.Duration`long:"custodianproofretrievaldelay" description:"The number of seconds the custodian waits after identifying an asset transfer on-chain and before retrieving the corresponding proof. Valid time units are {s, m, h}."`
Copy file name to clipboardExpand all lines: tapdb/postgres.go
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,8 @@ var (
43
43
)
44
44
45
45
// PostgresConfig holds the postgres database configuration.
46
+
//
47
+
// nolint:lll
46
48
typePostgresConfigstruct {
47
49
SkipMigrationsbool`long:"skipmigrations" description:"Skip applying migrations on startup."`
48
50
Hoststring`long:"host" description:"Database server hostname."`
@@ -52,8 +54,8 @@ type PostgresConfig struct {
52
54
DBNamestring`long:"dbname" description:"Database name to use."`
53
55
MaxOpenConnectionsint`long:"maxconnections" description:"Max open connections to keep alive to the database server."`
54
56
MaxIdleConnectionsint`long:"maxidleconnections" description:"Max number of idle connections to keep in the connection pool."`
55
-
ConnMaxLifetime time.Duration`long:"connmaxlifetime" description:"Max amount of time a connection can be reused for before it is closed."`
56
-
ConnMaxIdleTime time.Duration`long:"connmaxidletime" description:"Max amount of time a connection can be idle for before it is closed."`
57
+
ConnMaxLifetime time.Duration`long:"connmaxlifetime" description:"Max amount of time a connection can be reused for before it is closed. Valid time units are {s, m, h}."`
58
+
ConnMaxIdleTime time.Duration`long:"connmaxidletime" description:"Max amount of time a connection can be idle for before it is closed. Valid time units are {s, m, h}."`
57
59
RequireSSLbool`long:"requiressl" description:"Whether to require using SSL (mode: require) when connecting to the server."`
0 commit comments