protected override bool NewMetaStorage() { try { _metaDiscStorage.Add(new MetaDiscStorage(_storage, ChainType, ChainId, ChainIndex, "maintainaccounts", 256, DiscStorageFlags.UnsortedDynamicIndex | DiscStorageFlags.AppendOnly)); _metaDiscStorage.Add(new RevenueMetaDiscStorage(_storage, ChainType, ChainId, ChainIndex, "revenue")); // do not add it to the meta storage, there is no need for a rebuild if it's missing/corrupt _storedRevenueProposalsStorage = new MetaDiscStorage(_storage, ChainType, ChainId, ChainIndex, "revenueproposals", 1024, DiscStorageFlags.UnsortedDynamicIndex | DiscStorageFlags.AppendOnly); return(base.NewMetaStorage()); } catch (Exception ex) { Log.HandleException(ex, this); } return(false); }
protected override bool NewMetaStorage() { try { foreach (var info in _storagesInfo) { var storage = new MetaDiscStorage(_storage, ChainType, ChainId, ChainIndex, $"feature_{info.Feature.FeatureId}_{info.Name}", info.BlockSize, info.StorageFlags); _metaDiscStorage.Add(storage); info.Storage = storage; } return(true); } catch (Exception ex) { Log.HandleException(ex, this); } return(false); }