Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit cbeed65

Browse files
committed
cleanup
1 parent 9fc85d5 commit cbeed65

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

lib/blockchain_api/query/stats.ex

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defmodule BlockchainAPI.Query.Stats do
3232
"total" => get_supply()
3333
},
3434
"block_time" => %{
35-
"24h" => get_query_by_shift(&query_block_interval/2, hours: -24),
35+
"24h" => get_block_time(hours: -24),
3636
"7d" => get_block_time(days: -7),
3737
"30d" => get_block_time(days: -30)
3838
},
@@ -260,18 +260,6 @@ defmodule BlockchainAPI.Query.Stats do
260260
end)
261261
end
262262

263-
# select * from poc_witnesses pw
264-
# inner join poc_path_elements pe
265-
# on pe.id = pw.poc_path_elements_id
266-
# inner join poc_receipts_transactions rt
267-
# on rt.hash = pe.poc_receipts_transactions_hash
268-
# inner join transactions tx
269-
# on tx.hash = rt.hash
270-
# inner join blocks b
271-
# on b.height = tx.block_height
272-
# WHERE (b.time >= 1568156776) AND (b.time <= 1568243176)
273-
# order by pw.distance desc, b.time asc
274-
275263
defp query_farthest_witness(start, finish) do
276264
distance_query =
277265
from(
@@ -315,7 +303,7 @@ defmodule BlockchainAPI.Query.Stats do
315303

316304
query
317305
|> Repo.all()
318-
|> Enum.map(fn %{gateway: gateway, owner: owner} = m ->
306+
|> Enum.map(fn %{gateway: gateway} = m ->
319307
m
320308
|> Map.put(:gateway, Util.bin_to_string(gateway))
321309
end)

0 commit comments

Comments
 (0)