﻿using System.Threading.Tasks;
using Trinity.Network;

namespace Trinity.Api.Queries
{
	public class GetNodeConnectionCountApiQuery : IGetNodeConnectionCountApiQuery
	{
		private readonly ILocalNode _localNode;

		public GetNodeConnectionCountApiQuery(ILocalNode localNode)
		{
			_localNode = localNode;
		}
		public async Task<int> ExecuteAsync()
		{
			await Task.FromResult(0); //build out API to support async transactions.
			return _localNode.RemoteNodeCount;
		}
	}
}