Exemplo n.º 1
0
        public BlockDiscStorage(Base.Storage storage, ChainType chainType, int chainId, uint chainIndex, long sliceIndex, bool readOnly) : base(storage, Path.Combine(BlockStorage.GetBlockStoragePath(chainType, chainId, chainIndex), sliceIndex.ToString()), 256, 32, DiscStorageFlags.AppendOnly | DiscStorageFlags.DynamicBlockSize | (readOnly ? DiscStorageFlags.Readonly : DiscStorageFlags.None))
        {
            SliceIndex = sliceIndex;

            if (UserDataUnpacker.UnpackBool())
            {
                UserDataUnpacker.UnpackUshort();
            }
        }
 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();
     }
 }