Skip to content

Commit

Permalink
Merge pull request #31 from FlipsideCrypto/AN-3823_adj_txs_blockfork
Browse files Browse the repository at this point in the history
activate block hash test and walkback realtime blocks qualify
  • Loading branch information
forgxyz authored Aug 22, 2023
2 parents b96d43a + b7a9f7b commit 67ebc2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ WITH last_3_days AS ({% if var('STREAMLINE_RUN_HISTORY') %}
last_3_days
)
AND block_number IS NOT NULL
) qualify ROW_NUMBER() over (
PARTITION BY block_number
ORDER BY
_inserted_timestamp DESC
) = 1
)
)
SELECT
block_number,
Expand Down
11 changes: 5 additions & 6 deletions tests/tests__block_parent_gap.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{{ config(
severity = 'error',
enabled = False
severity = 'error'
) }}
-- disabled for now as we are testing block gaps by ordinality
-- enabled in addition to sequence gap test to ensure we have the correct blocks by hash
WITH silver_blocks AS (

SELECT
block_number,
block_number - 1 as missing_block_number,
block_number - 1 AS missing_block_number,
block_timestamp,
block_hash,
previous_block_hash,
Expand All @@ -16,11 +15,11 @@ WITH silver_blocks AS (
block_number ASC
) AS prior_hash,
_partition_by_block_id,
current_timestamp as _test_timestamp
CURRENT_TIMESTAMP AS _test_timestamp
FROM
{{ ref('silver__blocks') }}
WHERE
block_timestamp::date < CURRENT_DATE
block_timestamp :: DATE < CURRENT_DATE
)
SELECT
*
Expand Down

0 comments on commit 67ebc2b

Please sign in to comment.