github.com/dmmcquay/sia@v1.3.1-0.20180712220038-9f8d535311b9/siatest/consts.go (about) 1 package siatest 2 3 import ( 4 "github.com/NebulousLabs/Sia/crypto" 5 "github.com/NebulousLabs/Sia/modules" 6 ) 7 8 // ChunkSize is a helper method to calculate the size of a chunk depending on 9 // the minimum number of pieces required to restore the chunk. 10 func ChunkSize(minPieces uint64) uint64 { 11 return (modules.SectorSize - crypto.TwofishOverhead) * minPieces 12 }