-
Notifications
You must be signed in to change notification settings - Fork 198
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
Fixes after review - genesis indexing #3646
Conversation
ssd04
commented
Dec 15, 2021
- fixes after review
- more unit tests
- set TxCount for genesis block header
&mock.HasherMock{}, | ||
&mock.MarshalizerMock{}, | ||
) | ||
args := genesis.AccountsParserArgs{ |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added additional function 👍