blockchain v0: move to constant

This commit is contained in:
Aleksandr Bezobchuk
2021-01-13 10:37:18 -05:00
parent c5a126fe9b
commit 5dd1da9ebf
2 changed files with 2 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ eg, L = latency = 0.1s
const (
requestIntervalMS = 2
maxTotalRequesters = 600
maxPeerErrBuffer = 1000
maxPendingRequests = maxTotalRequesters
maxPendingRequestsPerPeer = 20

View File

@@ -118,7 +118,7 @@ func NewReactor(
}
requestsCh := make(chan BlockRequest, maxTotalRequesters)
errorsCh := make(chan peerError, 1000) // NOTE: The capacity should be larger than the peer count.
errorsCh := make(chan peerError, maxPeerErrBuffer) // NOTE: The capacity should be larger than the peer count.
r := &Reactor{
initialState: state,