What current issue(s) does this address, or what feature is it adding?
Audit of Testnet block 2728887 showed a deviation in gas consumption due to failed comparison between a single element ByteArray and an integer.
How did you solve this problem?
ensure that the Equals method of ByteArray tries to compare against another ByteArray type instead of whatever type it might be.
How did you make sure your solution works?
audit of the block now passes
Are there any special changes in the code that we should be aware of?
Please check the following, if applicable:
[ ] 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 decreased (-0.006%) to 85.267% when pulling 56095c4d13f84b352246cca89ec6d6b3c9759097 on ixje:fix-bytearray-equals into 9e8421a54a15c38628d8b90983104eb129a74604 on CityOfZion:development.
What current issue(s) does this address, or what feature is it adding? Audit of Testnet block
2728887
showed a deviation in gas consumption due to failed comparison between a single elementByteArray
and an integer.How did you solve this problem? ensure that the
Equals
method ofByteArray
tries to compare against anotherByteArray
type instead of whatever type it might be.How did you make sure your solution works? audit of the block now passes
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)