CityOfZion / neo-python

Python Node and SDK for the NEO 2.x blockchain. For NEO 3.x go to our successor project neo-mamba
https://neo-python.readthedocs.io/en/latest/
MIT License
313 stars 189 forks source link

Fix ByteArray equals #997

Closed ixje closed 5 years ago

ixje commented 5 years ago

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:

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.006%) to 85.267% when pulling 56095c4d13f84b352246cca89ec6d6b3c9759097 on ixje:fix-bytearray-equals into 9e8421a54a15c38628d8b90983104eb129a74604 on CityOfZion:development.