What current issue(s) does this address, or what feature is it adding?
audit of testnet block 1473972 showed a deviation in storage due to a different rounding used for C# compared to neo-python when dividing 2 BigIntegers where the dividend is negative. Specifically -11001000000 / 86400 should result in -127326 but resulted in -127327.
How did you solve this problem?
change divide logic
How did you make sure your solution works?
audit for the block passes, other tests still pass, added a couple more tests for which I took the expected values from a C# program.
Are there any special changes in the code that we should be aware of?
Please check the following, if applicable:
[X] Did you add any tests?
[X] Did you run make lint?
[X] Did you run make test?
[X] Are you making a PR to a feature branch or development rather than master?
[X] Did you add an entry to CHANGELOG.rst? (if not, please do)
Coverage increased (+0.01%) to 85.295% when pulling 3573d596e8f44e6b5c16c8203d93c16afa03bdd9 on ixje:fix-bigint-div into 6931bd0c978a7ff5df3069253411255b3ffe1545 on CityOfZion:development.
What current issue(s) does this address, or what feature is it adding? audit of testnet block
1473972
showed a deviation in storage due to a different rounding used for C# compared to neo-python when dividing 2 BigIntegers where the dividend is negative. Specifically-11001000000
/86400
should result in-127326
but resulted in-127327
.How did you solve this problem? change divide logic
How did you make sure your solution works? audit for the block passes, other tests still pass, added a couple more tests for which I took the expected values from a C# program.
Are there any special changes in the code that we should be aware of?
Please check the following, if applicable:
make lint
?make test
?CHANGELOG.rst
? (if not, please do)