//Find the proper block\r
var blockIndex = treeHash.HashDictionary[missingHash];\r
long offset = blockIndex*accountInfo.BlockSize;\r
+ Debut.Assert(offset>=0,String.Format("Negative Offset! BlockIndex {0} BlockSize {1}",blockIndex,accountInfo.BlockSize));\r
\r
var read = fileInfo.Read(buffer, offset, accountInfo.BlockSize);\r
\r
?? (_stringHashes = Hashes.Select(hash => hash.ToHashString()).ToArray());
}
- ConcurrentDictionary<string, int> _blocks;
+ ConcurrentDictionary<string, long> _blocks;
//Retruns the hashes as a dictionary to the block location. Used to locate blocks
- public IDictionary<string,int> HashDictionary
+ public IDictionary<string,long> HashDictionary
{
get
{
- Func<ConcurrentDictionary<string, int>> blocksInit = () =>
+ Func<ConcurrentDictionary<string, long>> blocksInit = () =>
{
var blocks =
- new ConcurrentDictionary<string, int>();
+ new ConcurrentDictionary<string, long>();
if (Hashes == null)
return blocks;