Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
goran-ethernal committed Feb 20, 2025
1 parent c99394c commit e2d7002
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions aggsender/flow_aggchain_prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (a *aggchainProverFlow) GetCertificateBuildParams(ctx context.Context) (*ty
// this is crucial since Aggchain Prover will use this root to generate the proofs as well
buildParams.L1InfoTreeRootFromWhichToProve = root

if err := a.checkIfClaimsArePartOfFinalizedL1InfoTree(ctx, root, buildParams.Claims); err != nil {
if err := a.checkIfClaimsArePartOfFinalizedL1InfoTree(root, buildParams.Claims); err != nil {
return nil, fmt.Errorf("aggchainProverFlow - error checking if claims are part of "+
"finalized L1 Info tree root: %s with index: %d: %w", root.Hash, root.Index, err)
}
Expand Down Expand Up @@ -169,8 +169,9 @@ func (a *aggchainProverFlow) GetCertificateBuildParams(ctx context.Context) (*ty
}

// checkIfClaimsArePartOfFinalizedL1InfoTree checks if the claims are part of the finalized L1 Info tree
func (a *aggchainProverFlow) checkIfClaimsArePartOfFinalizedL1InfoTree(ctx context.Context,
finalizedL1InfoTreeRoot *treeTypes.Root, claims []bridgesync.Claim) error {
func (a *aggchainProverFlow) checkIfClaimsArePartOfFinalizedL1InfoTree(
finalizedL1InfoTreeRoot *treeTypes.Root,
claims []bridgesync.Claim) error {
for _, claim := range claims {
info, err := a.l1InfoTreeSyncer.GetInfoByGlobalExitRoot(claim.GlobalExitRoot)
if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions aggsender/flow_aggchain_prover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,6 @@ func TestGetImportedBridgeExitsForProver(t *testing.T) {
func Test_AggchainProverFlow_CheckIfClaimsArePartOfFinalizedL1InfoTree(t *testing.T) {
t.Parallel()

ctx := context.Background()

testCases := []struct {
name string
mockFn func(*mocks.L1InfoTreeSyncer)
Expand Down Expand Up @@ -822,7 +820,7 @@ func Test_AggchainProverFlow_CheckIfClaimsArePartOfFinalizedL1InfoTree(t *testin

tc.mockFn(mockL1InfoTreeSyncer)

err := aggchainFlow.checkIfClaimsArePartOfFinalizedL1InfoTree(ctx, tc.finalizedRoot, tc.claims)
err := aggchainFlow.checkIfClaimsArePartOfFinalizedL1InfoTree(tc.finalizedRoot, tc.claims)
if tc.expectedError != "" {
require.ErrorContains(t, err, tc.expectedError)
} else {
Expand Down

0 comments on commit e2d7002

Please sign in to comment.