diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce9903b5..eb4cc791 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,7 +154,35 @@ jobs: env: RISC0_DEV_MODE: "1" RUST_LOG: "info" - run: cargo nextest run -p integration_tests -- --skip tps_test + run: cargo nextest run -p integration_tests -- --skip tps_test --skip indexer + + integration-tests-indexer: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v5 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/install-system-deps + + - uses: ./.github/actions/install-risc0 + + - uses: ./.github/actions/install-logos-blockchain-circuits + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install active toolchain + run: rustup install + + - name: Install nextest + run: cargo install --locked cargo-nextest + + - name: Run tests + env: + RISC0_DEV_MODE: "1" + RUST_LOG: "info" + run: cargo nextest run -p integration_tests indexer -- --skip tps_test valid-proof-test: runs-on: ubuntu-latest diff --git a/indexer/core/src/lib.rs b/indexer/core/src/lib.rs index 46a153e3..1e2986a3 100644 --- a/indexer/core/src/lib.rs +++ b/indexer/core/src/lib.rs @@ -236,21 +236,21 @@ impl IndexerCore { }); } - if let Some(first_l2_block) = l2_block_vec.first() { - if first_l2_block.header.block_id == 1 { - info!("INITIAL_SEARCH: Found channel start"); - break 'outer; - } - } else { - // Step back to parent - let parent = cycle_block.header().parent(); + if let Some(first_l2_block) = l2_block_vec.first() + && first_l2_block.header.block_id == 1 + { + info!("INITIAL_SEARCH: Found channel start"); + break 'outer; + } - if parent == backfill_limit { - break; - } + // Step back to parent + let parent = cycle_block.header().parent(); - cycle_header = parent; - }; + if parent == backfill_limit { + break; + } + + cycle_header = parent; } info!("INITIAL_SEARCH: Reached backfill limit, refetching last l1 lib header");