From 67b26f376cf4a55a97319c5124fb4f8db34ec544 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 20 Oct 2020 19:01:29 +0300 Subject: [PATCH] Fix find block timestamp query --- CHANGELOG.md | 1 + apps/explorer/lib/explorer/chain.ex | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29bc9a9584..1a7c52d014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- [#3374](https://github.com/poanetwork/blockscout/pull/3374) - Fix find block timestamp query - [#3373](https://github.com/poanetwork/blockscout/pull/3373) - Fix horizontal scroll in Tokens table - [#3370](https://github.com/poanetwork/blockscout/pull/3370) - Improve contracts verification: refine constructor arguments extractor - [#3368](https://github.com/poanetwork/blockscout/pull/3368) - Fix Verify contract loading button width diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 6918c32ba6..d27c996d64 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -5488,6 +5488,7 @@ defmodule Explorer.Chain do Block |> where([b], b.number == ^number) |> select([b], b.timestamp) + |> limit(1) |> Repo.one() end end