Fix peer_protocol benchmark
This commit is contained in:
parent
692facdebb
commit
092b139dcf
|
@ -40,7 +40,8 @@ func BenchmarkDecodePieces(t *testing.B) {
|
||||||
MaxLength: 1 << 18,
|
MaxLength: 1 << 18,
|
||||||
Pool: &sync.Pool{
|
Pool: &sync.Pool{
|
||||||
New: func() interface{} {
|
New: func() interface{} {
|
||||||
return make([]byte, pieceLen)
|
b := make([]byte, pieceLen)
|
||||||
|
return &b
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue