osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

Twap: Endblock tests

Open ValarDragon opened this issue 3 years ago • 0 comments

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)

ValarDragon avatar Jul 23 '22 13:07 ValarDragon