Skip to content

Commit 58c4573

Browse files
committed
Add comments
1 parent f79dbf4 commit 58c4573

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

config/const.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,37 @@ import (
99
resources "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
1010
)
1111

12-
// Stream related constants
1312
const (
14-
// We allow this duration to connect to the peer
13+
// StreamTimeoutConnect allow this duration to connect to the peer
1514
StreamTimeoutConnect = 10 * time.Second
1615

17-
// We allow this duration to read from the stream
16+
// StreamTimeoutRead allow this duration to read from the stream
1817
StreamTimeoutRead = 20 * time.Second
1918

20-
// We allow this duration to write to the stream
19+
// StreamTimeoutWrite allow this duration to write to the stream
2120
StreamTimeoutWrite = 20 * time.Second
2221

23-
// Cleanup interval && TTL for "waste" streams (aka streams that are not used)
22+
// StreamExcessTTL is the cleanup interval && TTL for "waste" streams (aka streams that are not used)
2423
StreamExcessTTL = 1 * time.Minute
2524

26-
// Max payload for a stream in bytes. 20MB
25+
// StreamMaxPayload is the max payload for a stream in bytes. 20MB
2726
StreamMaxPayload = 20 << 20
2827
)
2928

3029
// Signature Notifier related constants
3130
const (
32-
// We allow this duration to receive ACK back from the peer
31+
// SigNotifierAckTimeout is the duration to receive ACK back from the peer
3332
SigNotifierAckTimeout = 2 * time.Second
3433

35-
// Notifier tll. Will be cleaned up if no response from the peer
34+
// SigNotifierTTL is the TTL for the notifier. Will be cleaned up if no response from the peer
3635
SigNotifierTTL = 30 * time.Second
3736
SigNotifierCleanupInterval = 15 * time.Second
3837
)
3938

39+
// TSSCommonFinalTimeout is the graceful timeout for keygen/keysign finalization
4040
const TSSCommonFinalTimeout = 5 * time.Second
4141

42+
// PartyJoinMemberRetryInterval retry interval for joining keygen/keysign party
4243
const PartyJoinMemberRetryInterval = 500 * time.Millisecond
4344

4445
// ScalingLimits creates a config for libp2p scaling limits

0 commit comments

Comments
 (0)