Commit Graph

6 Commits

Author SHA1 Message Date
Abdul Rabbani
405629359f Control knownGaps in existing test 2022-05-16 14:10:43 -04:00
Abdul Rabbani
67f1427c8b Allow the application to process events in parallel
there is a main thread that tracks incoming messages, but then it spawns goroutines to actually process each slot so that they can happen concurrently.
2022-05-16 11:49:23 -04:00
Abdul Rabbani
fbc5f2e55b
Add KnownGaps Errors (#33) 2022-05-12 15:44:05 -04:00
Abdul Rabbani
7e8d63c667
Feature/22 test handling incoming events (#30)
* Checkpoint before the weekend

* Update location for SetupPostgresDB

* Include first functioning tests for processing head

* Fix gitignore

* Test CaptureHead | Add Metrics | Handle Test Race Conditions

This Commit allows us to:

* Test the `CaptureHead` function.
* Test parsing a single Head message.
* Test a Reorg condition.
* Add Metrics. This is primarily used for testing but can have future use cases.
* Rearrange the test due to race conditions introduced by reusing a variable. `BeforeEach` can't be used to update `BC`.

* Update and finalize testing at this stage

* Update code and CI/CD

* Fix lint errors

* Update CICD and fail when file not found.

* Update test to have failed as expected.
2022-05-12 09:52:13 -04:00
Abdul Rabbani
d1bc6a816f
Capture the head block in the DB entirely. (#27)
* -- Intermediary Commit --

Just want to commit my code over the weekend, in case I spill coffee on my workstation.

* Create DB models ready for write.

* Handle SSE events

* Update ref for stack-orchestrator

* Use env in one place only.

* Boot Application on PR

* Update syntax

* Update syntax

* Correct command

* Use bash instead of sh

* Use until instead of while

* Make linter happy and check sse subscription err

* Handle Reorgs - Untested
2022-05-06 11:03:15 -04:00
Abdul Rabbani
f46c4410a2 Clean up + Get State and Block 2022-04-27 14:01:59 -04:00