From 23454a2a48de94de7e45865d2348f560f2c4b3d4 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 22 May 2020 15:37:43 +0300 Subject: [PATCH] Upper border of tx speed display --- .../lib/block_scout_web/views/transaction_view.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 252df60bf5..e16061d28b 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -143,8 +143,9 @@ defmodule BlockScoutWeb.TransactionView do :pending end - def processing_time_duration(%Transaction{earliest_processing_start: nil}) do - :unknown + def processing_time_duration(%Transaction{earliest_processing_start: nil} = tx) do + avg_time = Timex.Duration.to_seconds(Explorer.Counters.AverageBlockTime.average_block_time()) + {:ok, "<= #{avg_time} seconds"} end def processing_time_duration(%Transaction{