full_sync and light_sync receipt tables and light receipt repository methods and test

This commit is contained in:
Ian Norden
2019-04-05 16:36:48 -05:00
parent 4d0f7ee1bb
commit c1940c3e58
15 changed files with 304 additions and 30 deletions
@@ -53,7 +53,7 @@ func (r *blockRetriever) retrieveFirstBlockFromReceipts(contractAddr string) (in
err := r.db.Get(
&firstBlock,
`SELECT number FROM blocks
WHERE id = (SELECT block_id FROM receipts
WHERE id = (SELECT block_id FROM full_sync_receipts
WHERE lower(contract_address) = $1
ORDER BY block_id ASC
LIMIT 1)`,