protected override async Task ActionAsync(CancellationToken cancel) { if (IsPaused) { return; } try { var allFeeEstimate = await BlockstreamInfoClient.GetFeeEstimatesAsync(cancel).ConfigureAwait(false); LastAllFeeEstimate = allFeeEstimate; if (allFeeEstimate?.Estimations?.Any() is true) { AllFeeEstimateArrived?.Invoke(this, allFeeEstimate); } InError = false; } catch { InError = true; throw; } }
public BlockstreamInfoFeeProvider(TimeSpan period, BlockstreamInfoClient blockstreamInfoClient) : base(period) { BlockstreamInfoClient = blockstreamInfoClient; }