public string GetAllBlocks(int index) { Model.Block block = null; if (index < DependencyManager.BlockMiner.Blockchain.Count) { block = DependencyManager.BlockMiner.Blockchain[index]; } return(JsonConvert.SerializeObject(block)); }
public string GetAllBlocks(int blocknum) { Model.Block block = null; if (blocknum < DependencyManager.BlockMiner.Blockchain.Count) { block = DependencyManager.BlockMiner.Blockchain[blocknum]; } return(JsonConvert.SerializeObject(block, Formatting.Indented)); }