Skip to content

Commit

Permalink
Aggregator refactoring and tests addition (0xPolygonHermez#964)
Browse files Browse the repository at this point in the history
* refactored aggregator.go

* added tests for the aggregator.go

* merged with dev

* fixed lint

* added logs to the aggregator and fixed roots in the aggr test

* removed unnecessary db calls
  • Loading branch information
Mikelle authored Jul 29, 2022
1 parent 88433d1 commit 51b09ca
Show file tree
Hide file tree
Showing 12 changed files with 832 additions and 259 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ generate-mocks: ## Generates mocks for the tests, using mockery tool
mockery --name=stateInterface --dir=synchronizer --output=synchronizer --outpkg=synchronizer --structname=stateMock --filename=mock_state.go
mockery --name=Tx --srcpkg=github.com/jackc/pgx/v4 --output=synchronizer --outpkg=synchronizer --structname=dbTxMock --filename=mock_dbtx.go

## mocks for the aggregator tests
mockery --name=stateInterface --dir=aggregator --output=aggregator/mocks --outpkg=mocks --structname=StateMock --filename=mock_state.go
mockery --name=proverClient --dir=aggregator --output=aggregator/mocks --outpkg=mocks --structname=ProverClientMock --filename=mock_proverclient.go
mockery --name=etherman --dir=aggregator --output=aggregator/mocks --outpkg=mocks --structname=Etherman --filename=mock_etherman.go
mockery --name=ethTxManager --dir=aggregator --output=aggregator/mocks --outpkg=mocks --structname=EthTxManager --filename=mock_ethtxmanager.go

.PHONY: generate-code-from-proto
generate-code-from-proto: ## Generates code from proto files
Expand Down
Loading

0 comments on commit 51b09ca

Please sign in to comment.