@@ -54,7 +54,7 @@ func init() {
func BlockSize(fileSize int64) int {
var blockSize int
for _, blockSize = range BlockSizes {
- if fileSize < int64(DesiredPerFileBlocks*blockSize) {
+ if fileSize < DesiredPerFileBlocks*int64(blockSize) {
break
}
@@ -4,6 +4,7 @@ package protocol
import (
"bytes"
+ "encoding/hex"
"encoding/json"
"errors"
"io"
@@ -12,8 +13,6 @@ import (
"testing"
"testing/quick"
- "encoding/hex"
-
"github.com/syncthing/syncthing/lib/rand"
)