osmosis
osmosis copied to clipboard
Twap: Endblock tests
Background
We need more tests around the end block flow. There was one test added in #2168 that shows in the normal case, it works.
We should extract that test into a table driven test, to allow more pool setups, and swaps at different heights.
Furthermore we should also generalize it to allow testing createpool and a swap in the same block.
Suggested Design & Acceptance Criteria
- [x] Make endblock test in hook_test.go table driven
- [ ] Make a new test to test the case where we create a pool and a swap in the same block. (Ensure saved record is only the end block spot price)