Have only one block size

This commit is contained in:
Audrius Butkevicius
2014-09-29 23:01:17 +01:00
parent 493dc8fcd5
commit 41b8dd2863
3 changed files with 3 additions and 5 deletions

View File

@@ -469,7 +469,7 @@ func (p *Puller) shortcutFile(file protocol.FileInfo) {
// copierRoutine reads pullerStates until the in channel closes and performs
// the relevant copy.
func (p *Puller) copierRoutine(in <-chan copyBlocksState, out chan<- *sharedPullerState) {
buf := make([]byte, scanner.StandardBlockSize)
buf := make([]byte, protocol.BlockSize)
nextFile:
for state := range in {
@@ -575,7 +575,7 @@ func (p *Puller) finisherRoutine(in <-chan *sharedPullerState) {
l.Warnln("puller: final:", err)
continue
}
err = scanner.Verify(fd, scanner.StandardBlockSize, state.file.Blocks)
err = scanner.Verify(fd, protocol.BlockSize, state.file.Blocks)
fd.Close()
if err != nil {
os.Remove(state.tempName)