Browse Source

addrbook_test: preallocate memory for bookSizes (#3268)

Fixes https://circleci.com/gh/tendermint/tendermint/44901
pull/3277/head
Anton Kaliaev 6 years ago
committed by GitHub
parent
commit
11e36d0bfb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      p2p/pex/addrbook_test.go

+ 1
- 1
p2p/pex/addrbook_test.go View File

@ -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])
}


Loading…
Cancel
Save