XL/Erasure: Make bit-rot verification based on xl.json algo. (#2299)

Currently `xl.json` saves algorithm information for bit-rot
verification. Since the bit-rot algo's can change in the
future make sure the erasureReadFile doesn't default to
a particular algo. Instead use the checkSumInfo.
This commit is contained in:
Harshavardhana
2016-07-28 02:20:34 -07:00
committed by GitHub
parent 65f71ce0c5
commit f503ac3db8
11 changed files with 83 additions and 66 deletions
+1 -2
View File
@@ -23,8 +23,7 @@ import (
// Test validates the number hash writers returned.
func TestNewHashWriters(t *testing.T) {
diskNum := 8
hashWriters := newHashWriters(diskNum)
hashWriters := newHashWriters(diskNum, bitRotAlgo)
if len(hashWriters) != diskNum {
t.Errorf("Expected %d hashWriters, but instead got %d", diskNum, len(hashWriters))
}