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