Skip to content

Commit

Permalink
Fixed round check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
smickovskid committed May 16, 2024
1 parent ba9ddd3 commit e725248
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ jobs:
fi
- name: Checkout the repo
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Create target folder
run: mkdir -p ./contracts/target/deploy
- name: Download Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: artifacts
path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
- name: Check artifacts
run: ls -la ${{ env.CONTRACT_ARTIFACTS_PATH }}
- name: Install Solana CLI # required for ensuring the local test validator is configured correctly
run: ./scripts/install-solana-ci.sh
- name: Install gauntlet
Expand Down
10 changes: 10 additions & 0 deletions integration-tests/common/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,13 @@ func formatBuffer(buf []byte) string {
}
return result
}

func GetLatestRound(transmissions []gauntlet.Transmission) gauntlet.Transmission {
highestRound := transmissions[0]
for _, t := range transmissions[1:] {
if t.RoundId > highestRound.RoundId {
highestRound = t
}
}
return highestRound
}
4 changes: 2 additions & 2 deletions integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestSolanaOCRV2Smoke(t *testing.T) {
RoundId: 0,
}
for successFullRounds < *config.OCR2.Smoke.NumberOfRounds {
require.Less(t, stuck, 10, "Rounds have been stuck for more than 10 iterantions")
require.Less(t, stuck, 10, "Rounds have been stuck for more than 10 iterations")
log.Info().Str("Transmission", sg.OcrAddress).Msg("Inspecting transmissions")
transmissions, err := sg.FetchTransmissions(sg.OcrAddress)
require.NoError(t, err)
Expand All @@ -107,7 +107,7 @@ func TestSolanaOCRV2Smoke(t *testing.T) {
stuck++
continue
}
currentRound := transmissions[len(transmissions)-1]
currentRound := common.GetLatestRound(transmissions)
if prevRound.RoundId == 0 {
prevRound = currentRound
}
Expand Down

0 comments on commit e725248

Please sign in to comment.