-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add debug logging and enhance block polling logic (#19)
### TL;DR Added ability to set block limit for polling. Added additional logging for RPC method support checks and added safeguards for block data serialization. ### What changed? - Added logging for RPC method support checks in `rpc.go` - Introduced `POLL_UNTIL_BLOCK` environment variable to limit polling - Modified block range calculation to prevent skipping the genesis block - Updated `GetLatestPolledBlockNumber` to return `math.MaxUint64` when no block is found so next block polled will overflow to genesis - Added a null check for `WithdrawalsHash` in block serialization ### How to test? 1. Set the `POLL_UNTIL_BLOCK` environment variable to test polling limits 2. Verify logging output for RPC method support checks 3. Ensure polling starts from genesis when no last polled block is found 4. Test block serialization with and without `WithdrawalsHash` data
- Loading branch information
Showing
4 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters