mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
uint* to int* whereever appropriate; https://www.reddit.com/r/golang/comments/2q5vdu/int_vs_uint/
This commit is contained in:
@ -11,14 +11,14 @@ import (
|
||||
|
||||
type testPeer struct {
|
||||
id string
|
||||
height uint
|
||||
height int
|
||||
}
|
||||
|
||||
func makePeers(numPeers int, minHeight, maxHeight uint) map[string]testPeer {
|
||||
func makePeers(numPeers int, minHeight, maxHeight int) map[string]testPeer {
|
||||
peers := make(map[string]testPeer, numPeers)
|
||||
for i := 0; i < numPeers; i++ {
|
||||
peerId := RandStr(12)
|
||||
height := minHeight + uint(rand.Intn(int(maxHeight-minHeight)))
|
||||
height := minHeight + rand.Intn(maxHeight-minHeight)
|
||||
peers[peerId] = testPeer{peerId, height}
|
||||
}
|
||||
return peers
|
||||
@ -26,7 +26,7 @@ func makePeers(numPeers int, minHeight, maxHeight uint) map[string]testPeer {
|
||||
|
||||
func TestBasic(t *testing.T) {
|
||||
peers := makePeers(10, 0, 1000)
|
||||
start := uint(42)
|
||||
start := 42
|
||||
timeoutsCh := make(chan string, 100)
|
||||
requestsCh := make(chan BlockRequest, 100)
|
||||
pool := NewBlockPool(start, requestsCh, timeoutsCh)
|
||||
@ -78,7 +78,7 @@ func TestBasic(t *testing.T) {
|
||||
|
||||
func TestTimeout(t *testing.T) {
|
||||
peers := makePeers(10, 0, 1000)
|
||||
start := uint(42)
|
||||
start := 42
|
||||
timeoutsCh := make(chan string, 100)
|
||||
requestsCh := make(chan BlockRequest, 100)
|
||||
pool := NewBlockPool(start, requestsCh, timeoutsCh)
|
||||
|
Reference in New Issue
Block a user