You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
Maybe Add some data verification for the final database? Was thinking could maybe try to do a simple verification of the parent hash on the block vs. the previous block in db like below. Also, was manually checking total difficulty against etherscan, like the 2nd query, but maybe this could be automated.
--parent hash on block should match has of previous block
SELECT
block_number,
block_hash,
block_parenthash,
parent
FROM (
SELECT
block_hash,
lag(block_hash)
OVER (
ORDER BY block_number ) AS parent,
block_parenthash,
block_number
FROM blocks
) a
WHERE parent != block_parenthash
ORDER BY block_number;
--block cumulative difficulty ** can use as qc
SELECT *
FROM (
SELECT
block_number,
to_char(sum(block_difficulty)
OVER (
ORDER BY block_number ), '999,999,999,999,999,999,999,999')
FROM blocks
) a
WHERE block_number IN (
4750712,
4756962,
4763212,
4765177,
4766503
);
The text was updated successfully, but these errors were encountered:
Maybe Add some data verification for the final database? Was thinking could maybe try to do a simple verification of the parent hash on the block vs. the previous block in db like below. Also, was manually checking total difficulty against etherscan, like the 2nd query, but maybe this could be automated.
The text was updated successfully, but these errors were encountered: