fix(tests): flakiness across a few different tests (#2982)
> [!NOTE] > discovered the issue, bob doesn't have the delegate keys, and therefore when he receives preconfirmations he can't verify the signature, and then rejects the messages. the rejections reduce the peer score of the authority node and then the two are disconnected. maybe the preconfirmation service should just `GossipsubMessageAcceptance::Ignore` if it has no delegate keys instead of `GossipsubMessageAcceptance::Reject`. focusing on improving the configuration of nodes, enhancing consistency checks, and cleaning up unused imports. ### Configuration Enhancements: * Added a new configuration option `pre_confirmation_signature_service.echo_delegation_interval` to set an interval of 100 milliseconds for echo delegation in `make_nodes`. This improves configurability for testing scenarios. * Introduced conditional database initialization in `make_config`, using `CombinedDatabase` when the `default` feature is enabled, and falling back to an in-memory database otherwise. This provides flexibility for different environments. ### Consistency Check Improvements: * Refactored the `consistency` method to use a `tokio::time::interval` for periodic checks, replacing the previous loop and event-based logic. This simplifies the code and ensures consistent behavior. * Consolidated consistency methods by introducing `consistency_with_duration`, which allows specifying a custom timeout duration. The existing `consistency_10s` and `consistency_20s` methods now delegate to this new method for better code reuse. ### Cleanup: * Removed an unused import `schema::tx::types::TransactionStatus` to tidy up the codebase.
A
Aaryamann Challani committed
c6bda0af4ce093d5e810645a86b7ba5602143dc3
Parent: 47b84ca
Committed by GitHub <noreply@github.com>
on 5/2/2025, 4:46:33 PM