From d83f780ffbaed4edfd733d3fbed2137bf53ff3cc Mon Sep 17 00:00:00 2001 From: Will Winder Date: Tue, 20 Aug 2024 14:05:56 -0400 Subject: [PATCH] Add feature flag for build test. --- execute/report/report_test.go | 40 ++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/execute/report/report_test.go b/execute/report/report_test.go index d9c04cf8d..fe4325695 100644 --- a/execute/report/report_test.go +++ b/execute/report/report_test.go @@ -734,16 +734,36 @@ func Test_Builder_Build(t *testing.T) { // look for error in Add or Build foundError := false - builder := NewBuilder( - ctx, - lggr, - hasher, - tokenDataReader, - codec, - evm.EstimateProvider{}, - tt.args.nonces, - tt.args.maxReportSize, - tt.args.maxGasLimit) + builder := &execReportBuilder{ + ctx: ctx, + lggr: lggr, + + tokenDataReader: tokenDataReader, + encoder: codec, + hasher: hasher, + estimateProvider: evm.EstimateProvider{}, + sendersNonce: tt.args.nonces, + expectedNonce: make(map[cciptypes.ChainSelector]map[string]uint64), + + maxReportSizeBytes: tt.args.maxReportSize, + maxGas: tt.args.maxGasLimit, + nonceCheckingEnabled: true, // TODO: remove feature flag. + } + + /* + // TODO: switch back to this when removing the feature flag. + builder := NewBuilder( + ctx, + lggr, + hasher, + tokenDataReader, + codec, + evm.EstimateProvider{}, + tt.args.nonces, + tt.args.maxReportSize, + tt.args.maxGasLimit) + */ + var updatedMessages []exectypes.CommitData for _, report := range tt.args.reports { updatedMessage, err := builder.Add(report)