예제 #1
0
        public BaseResponse <BlockBase> GetBlockchainTreeLinked()
        {
            var blockchain = _blockchainRepository.GetBlockchainTree();

            if (blockchain?.Blocks == null)
            {
                return(new ErrorResponse <BlockBase>("The blockchain tree does not contain blocks!", null));
            }

            var result = LocalMapper.ManualMap(blockchain);

            return(new SuccessResponse <BlockBase>("The blockchain from local storage.", result));
        }