Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Jul 11, 2024
1 parent 0aa9a3e commit 2ed2387
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions integration-tests/ccip-tests/testsetups/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,15 @@ func (o *CCIPTestSetUpOutputs) CheckGasUpdateTransaction(lggr *zerolog.Logger) e
}
}
}
lggr.Info().Interface("Tx hashes", transactions).Msg("Checked Gas Update Transactions")
// when leader lane setup is enabled, number of transaction should match the number of leader lanes defined.
if len(transactions) != len(o.Cfg.LeaderLanes) {
return fmt.Errorf("transaction count %d should match the number of leader lanes %d",
len(transactions), len(o.Cfg.LeaderLanes))
lggr.Warn().
Int("Tx hashes", len(transactions)).
Int("Leader lanes count", len(o.Cfg.LeaderLanes)).
Msg("Checked Gas Update transactions count doesn't match")
//return fmt.Errorf("transaction count %d should match the number of leader lanes %d",
// len(transactions), len(o.Cfg.LeaderLanes))
} else {
lggr.Info().
Int("Tx hashes", len(transactions)).
Expand All @@ -980,10 +985,16 @@ func (o *CCIPTestSetUpOutputs) CheckGasUpdateTransaction(lggr *zerolog.Logger) e
}
// each transaction should have number of network - 1 chain selectors and corresponding gas values.
// Say we have 3 networks, then we have expected every transaction to have 2 chain selectors
failed := false
for k, v := range transactions {
if len(v) != o.Cfg.TestGroupInput.NoOfNetworks-1 {
return fmt.Errorf("number of chain selector count %d should match the number of "+
"networks minus one %d", len(v), o.Cfg.TestGroupInput.NoOfNetworks-1)
lggr.Warn().
Str("Tx hash", k).
Interface("Chain selectors", v).
Int("Event emitted count", len(v)).
Msg("Checked Gas Update transaction events count doesn't match")
failed = true

} else {
lggr.Info().
Str("Tx hash", k).
Expand All @@ -992,7 +1003,10 @@ func (o *CCIPTestSetUpOutputs) CheckGasUpdateTransaction(lggr *zerolog.Logger) e
Msg("Checked Gas Update transaction events count")
}
}
lggr.Info().Interface("Tx hashes", transactions).Msg("Checked Gas Update Transactions")
if failed {
return fmt.Errorf("number of chain selector count should match the number of " +
"networks minus one ")
}
return nil
}

Expand Down

0 comments on commit 2ed2387

Please sign in to comment.