Esempio n. 1
0
        protected override bool ReadProperties(BinaryReader reader)
        {
            BlockType blockType = (BlockType)((BitConverter.ToUInt16(Header.Extensions, 0) & Block.BlockTypeMask) >> 8);

            switch (blockType)
            {
            case BlockType.Receive:
                Block = new ReceiveBlock();
                break;

            case BlockType.Send:
                Block = new SendBlock();
                break;

            case BlockType.Open:
                Block = new OpenBlock();
                break;

            case BlockType.Change:
                Block = new ChangeBlock();
                break;
            }

            Block.ReadFromStream(reader);
            return(true);
        }
 public void Visit(ChangeBlock block)
 {
     FillValue(block);
 }
Esempio n. 3
0
 public void Visit(ChangeBlock block)
 {
     throw new System.NotImplementedException();
 }
Esempio n. 4
0
 public void PutBlock(UInt256 blockHash, ChangeBlock block, UInt256 successorHash = null)
 {
     ThrowHelper.Sanity.ThrowIfTrue(block == null || GetBlock(successorHash) != null);
 }