-
Notifications
You must be signed in to change notification settings - Fork 44
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
chore: add tests for reward and power actor state extracters #83
Conversation
5fa4170
to
38b0e38
Compare
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.
Test writing is not glamorous, but I appreciate it! 🤝 🙌
tasks/actorstate/power_test.go
Outdated
state.TotalPledgeCollateral = abi.NewTokenAmount(0) | ||
state.ThisEpochRawBytePower = abi.NewStoragePower(0) | ||
state.ThisEpochQualityAdjPower = abi.NewStoragePower(0) | ||
state.ThisEpochPledgeCollateral = abi.NewTokenAmount(0) |
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.
Going to add some values here to make sure we don't get false positives due to zero values conveniently matching our test data.
assert.EqualValues(t, info.ParentStateRoot.String(), cr.StateRoot, "StateRoot") | ||
assert.EqualValues(t, state.CumsumBaseline.String(), cr.CumSumBaseline, "CumSumBaseline") | ||
// TODO: assertion fails due to bug in lotus see https://github.com/filecoin-project/lotus/pull/4268 | ||
// assert.EqualValues(t, state.CumsumRealized.String(), cr.CumSumRealized, "CumSumRealized") |
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.
Ahh... beautiful! Nice find!
9d05123
to
f53a7f7
Compare
Rebased onto latest master to make it more obvious what is being changed in this PR. |
* origin/master: fix: remove errgrp from UnindexedBlockData persist fix: verify there are no missing migrations before migrating (#89) chore: add tests for reward and power actor state extracters (#83) feat: support v2 actor codes (#84) feat(debug): Process actor by head without persistance (#86) fix: use debugf logging method in message processor (#82) feat(task): Create chainvis views and refresher (#77) perf: minor optimization of market actor diffing (#78) chore: fail database tests if VISOR_TEST_DB not set (#79) test(storage): add test to check for duplicate schema migrations (#80) in-process lotus "repo" lens (#75) Conflicts: tasks/actorstate/miner.go
Note that this branched from #81