Fix CI/CD failures: Resolve payout distribution test failures#241
Merged
Conversation
- Replaced Rust installation method with dtolnay/rust-toolchain action for better target support. - Added installation step for Stellar CLI and verification of its version. - Updated build and test steps for hello-world and predictify-hybrid contracts to use make commands. - Removed redundant source commands for environment setup.
- Updated CI workflow to install Rust and Stellar CLI using Homebrew for improved compatibility. - Modified build steps to streamline the process for Soroban contracts. - Adjusted payout distribution comments in the PredictifyHybrid contract to clarify usage and testing.
Contributor
Author
|
@greatest0fallt1me Please review |
greatest0fallt1me
self-requested a review
January 26, 2026 15:36
Contributor
|
@Baskarayelu, thanks for the quick fix. I appreciate it. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 6 failing tests in the CI/CD pipeline related to payout distribution functionality.
Changes Made
1. Fixed String Comparison in
distribute_payouts&outcome == winning_outcomewas not correctly matching winning outcomesoutcome == *winning_outcometo properly compare String values in Sorobancontracts/predictify-hybrid/src/lib.rs:1511, 15242. Removed Automatic Payout Distribution
resolve_market_manualwas automatically callingdistribute_payouts, causing test failures when tests tried to call it explicitlycontracts/predictify-hybrid/src/lib.rs:998-1004Test Results
cargo build --verbosepassesstellar contract build --verbosepassescargo test --verbosepassesFixed Tests
test_automatic_payout_distributiontest_claim_winnings_successfultest_integration_full_market_lifecycle_with_payoutstest_market_state_after_claimtest_payout_event_emissiontest_reentrancy_protection_claimImpact
Closes #240