mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
addrbook_test: preallocate memory for bookSizes (#3268)
Fixes https://circleci.com/gh/tendermint/tendermint/44901
This commit is contained in:
parent
354a08c25a
commit
11e36d0bfb
@ -528,7 +528,7 @@ func TestMultipleAddrBookAddressSelection(t *testing.T) {
|
|||||||
|
|
||||||
// Test for two books with sizes from following ranges
|
// Test for two books with sizes from following ranges
|
||||||
ranges := [...][]int{{33, 100}, {100, 175}}
|
ranges := [...][]int{{33, 100}, {100, 175}}
|
||||||
var bookSizes []int
|
bookSizes := make([]int, 0, len(ranges))
|
||||||
for _, r := range ranges {
|
for _, r := range ranges {
|
||||||
bookSizes = append(bookSizes, cmn.RandIntn(r[1]-r[0])+r[0])
|
bookSizes = append(bookSizes, cmn.RandIntn(r[1]-r[0])+r[0])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user