mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 05:46:32 +00:00
addrbook_test: preallocate memory for bookSizes (#3268)
Fixes https://circleci.com/gh/tendermint/tendermint/44901
This commit is contained in:
@@ -528,7 +528,7 @@ func TestMultipleAddrBookAddressSelection(t *testing.T) {
|
||||
|
||||
// Test for two books with sizes from following ranges
|
||||
ranges := [...][]int{{33, 100}, {100, 175}}
|
||||
var bookSizes []int
|
||||
bookSizes := make([]int, 0, len(ranges))
|
||||
for _, r := range ranges {
|
||||
bookSizes = append(bookSizes, cmn.RandIntn(r[1]-r[0])+r[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user