Fix peer_protocol benchmark

This commit is contained in:
Matt Joiner 2018-01-25 17:43:45 +11:00
parent 692facdebb
commit 092b139dcf
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ func BenchmarkDecodePieces(t *testing.B) {
MaxLength: 1 << 18,
Pool: &sync.Pool{
New: func() interface{} {
return make([]byte, pieceLen)
b := make([]byte, pieceLen)
return &b
},
},
}