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

test(chain): test chain economics processor #297

Closed
wants to merge 1 commit into from

Conversation

frrist
Copy link
Member

@frrist frrist commented Dec 3, 2020

This feels like a lot of typing for little reward. For now I'm wanting try this with github.com/stretchr/testify/mock but remain open to alternatives.

@frrist frrist self-assigned this Dec 3, 2020
@codecov-io
Copy link

Codecov Report

Merging #297 (d585491) into master (4021e6c) will decrease coverage by 1.1%.
The diff coverage is 14.2%.

@@           Coverage Diff            @@
##           master    #297     +/-   ##
========================================
- Coverage    45.2%   44.0%   -1.2%     
========================================
  Files          19      20      +1     
  Lines        1897    1971     +74     
========================================
+ Hits          859     869     +10     
- Misses        925     987     +62     
- Partials      113     115      +2     

Copy link
Contributor

@iand iand left a comment

Choose a reason for hiding this comment

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

I think the mock of the lens is valuable, as is reducing the node api to a smaller interface. We should always be writing code that accepts the smallest possible interface anyway.

However, much of this code is going to be redundant as soon as we move away from the random access approach used by the run command. LeaseTipSetEconomics and MarkTipSetEconomicsComplete won't be needed and the chain economics extraction interface becomes a lot simpler.

Currently have a second implementation of chain economics extraction in the chain package, which I expect to become the primary. I'm going to spend some time today to try and reduce that duplication by refactoring extractChainEconomicsModel to export it.

@iand
Copy link
Contributor

iand commented Dec 3, 2020

See #298 for a refactoring based on this

@frrist
Copy link
Member Author

frrist commented Dec 3, 2020

Closing in favor of #298. I appreciate the help here @iand

@frrist frrist closed this Dec 3, 2020
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.

3 participants