Commit Graph

12 Commits

Author SHA1 Message Date
Abdul Rabbani
36e8711891 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`.
2022-05-11 14:14:19 -04:00
Abdul Rabbani
adc26287db Handle conflicts 2022-05-10 14:36:53 -04:00
Abdul Rabbani
7746218102 Include first functioning tests for processing head 2022-05-10 14:31:56 -04:00
Abdul Rabbani
217ec700a8
Feature/22 test handling incoming events - Intermediary Commit (#28)
* Checkpoint before the weekend

* Update location for SetupPostgresDB
2022-05-09 14:44:27 -04:00
Abdul Rabbani
da36c02eac Checkpoint before the weekend 2022-05-06 17:35: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
08facb5f57 Added test to ensure the application shuts down gracefully or within a timeframe. 2022-04-28 14:50:29 -04:00
Abdul Rabbani
f46c4410a2 Clean up + Get State and Block 2022-04-27 14:01:59 -04:00
Abdul Rabbani
d496886f95 Process SSE messages, and include a graceful shutdown 2022-04-27 10:28:42 -04:00
Abdul Rabbani
87313887a4 Graceful Shutdown | Handle SSE | Requires Testing
This Commit contains the following:
* Graceful shutdowns.
* Handling all incoming SSE events for reorgs, finalizations, and head.

The structure of the `BeaconClient` has drastically changed and generics are used.
2022-04-26 13:57:01 -04:00
Abdul Rabbani
5b75f5a257 Create a single beaconclient pkg instead of having subpackages
The main reason to do this is so they can all access the `BeaconClient` Struct.
2022-04-25 11:32:46 -04:00
Abdul Rabbani
594d1e6ee8 Move healthcheck to beaconclient pkg. 2022-04-25 10:41:50 -04:00