Commit cbd1d0e7 authored by David Vorick's avatar David Vorick

clean up oob check

parent 30d90035
Pipeline #47432875 failed with stages
in 34 minutes and 42 seconds
......@@ -715,10 +715,8 @@ func (sf *SiaFile) goodPieces(chunkIndex int, offlineMap map[string]bool, goodFo
foundGoodForRenew := false
foundOnline := false
for _, piece := range pieceSet {
pktLen := len(sf.pubKeyTable)
hto := int(piece.HostTableOffset)
if hto >= pktLen {
build.Critical("Requesting a host that is outside the pubKeyTable", pktLen, hto, sf.Deleted)
if int(piece.HostTableOffset) >= len(sf.pubKeyTable) {
build.Critical("Requesting a host at offset", piece.HostTableOffset, "but the table has len", len(sf.pubKeyTable), "and sf.Deleted equals", sf.Deleted)
offline, exists1 := offlineMap[sf.pubKeyTable[piece.HostTableOffset].PublicKey.String()]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment