Example #1
0
        public static BlockChain ToBlockChain(this BlockChainModel blockChainModel)
        {
            blockChainModel.VerifyNotNull(nameof(blockChainModel));

            return(new BlockChain(blockChainModel.Blocks));
        }
Example #2
0
 public static void Verify(this BlockChainModel blockChainModel)
 {
     blockChainModel.VerifyNotNull(nameof(blockChainModel));
     blockChainModel.Blocks.VerifyNotNull(nameof(blockChainModel.Blocks));
     blockChainModel.Blocks.ForEach(x => x.Verify());
 }