-
Notifications
You must be signed in to change notification settings - Fork 24
Fix/v2 crash #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/v2 crash #685
Conversation
Introduces a `horizon_enabled` boolean flag within `SenderAccountConfig`, populated from the main application configuration (`config.horizon.enabled`).
This flag gates Horizon-specific functionality within the TAP agent:
- In `SenderAccount`:
- Database operations (fetching RAVs, querying/updating denylist) for `SenderType::Horizon` are now conditional on this flag being true.
- The `todo!()` for querying unfinalized V2 transactions is now only relevant if Horizon is enabled.
- A temporary check (`FIXME`) is added to `deny_sender_if_insolvent` to bypass denial logic for Horizon senders if the feature is disabled via config.
- In `SenderAccountsManager`:
- Fetching pending V2 (Horizon) sender allocations is skipped if the flag is false.
- The `new_receipts_watcher` task for V2/Horizon is only spawned if the flag is true.
This allows Horizon-related features, which may still be under development, to be effectively disabled via configuration, simplifying testing and allowing for incremental rollout without impacting existing functionality if Horizon support is not desired or ready.
fix(config): add missing config field
Pull Request Test Coverage Report for Build 14360847977Details
💛 - Coveralls |
|
i run the test locally and renames the test function to make it clear that the rav being tested is V1. We need for sure to enable this local testnet integration test in our CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @neithanmo! It's really clear 💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's wonderful. Clean and direct solution. Thank you so much!
This PR implements a feature flag mechanism for Horizon support to prevent crashes. Key changes:
horizon.enabled = falseconfiguration option in all relevant config filesThis change allows systems to run without Horizon support until full implementation is complete. The flag is set to false by default for safety.