public MetaDiscStorage(Base.Storage storage, ChainType chainType, int chainId, uint chainIndex, string name, int blockSize, DiscStorageFlags flags, int userDataSize = 20) : base(storage, Path.Combine(Chain.GetChainMetaDirectory(chainType, chainId, chainIndex), name), blockSize, userDataSize, flags) { if (UserDataUnpacker.UnpackBool()) { LastBlockId = UserDataUnpacker.UnpackLong(); LastTransactionId = UserDataUnpacker.UnpackLong(); MetaUnpack(); } }
public TransactionDiscStorage(Base.Storage storage, string name, int blockSize, DiscStorageFlags flags) : base(storage, name, blockSize, 32, flags) { if (UserDataUnpacker.UnpackBool()) { UserDataUnpacker.UnpackUshort(); FirstBlockId = UserDataUnpacker.UnpackLong(); LastBlockId = UserDataUnpacker.UnpackLong(); Split = UserDataUnpacker.UnpackBool(); } }