/// <summary> /// /// </summary> /// <returns></returns> private async Task <(ulong local, IEnumerable <NodeBlockCountProto> network)> Height() { var l = (ulong)await networkActorProvider.BlockHeight(); var n = await networkActorProvider.FullNetworkBlockHeight(); return(l, n); }
public async Task <IActionResult> BlockHeight() { try { var blockHeight = await networkProvider.BlockHeight(); return(new ObjectResult(new { height = blockHeight })); } catch (Exception ex) { logger.LogError($"<<< BlockHeight - Controller >>>: {ex.ToString()}"); } return(new StatusCodeResult(StatusCodes.Status500InternalServerError)); }