Example #1
0
 public IRpcMethodResult GetBlockInfo(string blockHash)
 {
     try
     {
         BlockComponent component = new BlockComponent();
         var            result    = component.GetBlockDetail(blockHash);
         return(Ok(result));
     }
     catch (CommonException ce)
     {
         return(Error(ce.ErrorCode, ce.Message, ce));
     }
     catch (Exception ex)
     {
         return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
     }
 }