Skip to content

Commit

Permalink
get header by block number
Browse files Browse the repository at this point in the history
  • Loading branch information
ramilexe committed Jan 25, 2021
1 parent 8a1f6b3 commit 4939e77
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions db/migrations/00018_ethHeaderCidByBlockNumber.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- +goose Up
CREATE FUNCTION "ethHeaderCidByBlockNumber"(n bigint) returns SETOF eth.header_cids
stable
language sql
as
$$
SELECT * FROM eth.header_cids WHERE block_number=$1 ORDER BY id
$$;

-- +goose Down
DROP FUNCTION "ethHeaderCidByBlockNumber"(bigint);

0 comments on commit 4939e77

Please sign in to comment.