public BlockProvider(string resourceName)
{
this.blocks = new ConcurrentDictionary<string, Block>();
this.heightNames = new Dictionary<int, string>();
this.hashNames = new Dictionary<UInt256, string>();
var assembly = Assembly.GetCallingAssembly();
var stream = assembly.GetManifestResourceStream(resourceName);
this.zip = new ZipArchive(stream);
foreach (var entry in zip.Entries)
{
var chunks = Path.GetFileNameWithoutExtension(entry.Name).Split('_');
var blockHeight = int.Parse(chunks[0]);
var blockHash = UInt256.ParseHex(chunks[1]);
heightNames.Add(blockHeight, entry.Name);
hashNames.Add(blockHash, entry.Name);
}
}