Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes after review - genesis indexing #3646

Merged

Conversation

ssd04
Copy link
Contributor

@ssd04 ssd04 commented Dec 15, 2021

  • fixes after review
  • more unit tests
  • set TxCount for genesis block header

@ssd04 ssd04 marked this pull request as draft December 15, 2021 14:20
@ssd04 ssd04 marked this pull request as ready for review December 16, 2021 08:43
examples/address_test.go Outdated Show resolved Hide resolved
&mock.HasherMock{},
&mock.MarshalizerMock{},
)
args := genesis.AccountsParserArgs{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we create an unexported function in the test file, something like createMockAccountsParserArgs and return a populated argument struct that will work as it is in the xxx_ShouldWork test.
On the other tests, like in the TestNewAccountsParser_NilEntireBalanceShouldErr we could have something like:

args := createMockAccountsParserArgs()
args.EntireSupply = nil
////.......

In this way the duplicate code can be removed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added additional function 👍

@ssd04 ssd04 merged commit 48a7b56 into feat/index-genesis-transactions Dec 16, 2021
@ssd04 ssd04 deleted the fixes-after-review-genesis-indexing branch December 16, 2021 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants