statechannels / dispute-game

A prototype of the dispute game in typescript and solidity.
MIT License
9 stars 0 forks source link

Simulate solidity math #31

Closed lalexgap closed 3 years ago

lalexgap commented 3 years ago

Fixes #29

Calls math.Floor in the interval function. This simulates the behaviour division rounding to 0 in solidity.

The only real issue that popped up seemed to be around interval()=1. Previously we would rely on fixed point values being closer but not equal to 1. By switching a few of these checks all the tests now pass.

kerzhner commented 3 years ago

I took a crack at this. Curious what you think about https://github.com/statechannels/dispute-game/pull/32.

lalexgap commented 3 years ago

Closing in favour of #32