Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix endianness of getBalance #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdetrio
Copy link
Contributor

@cdetrio cdetrio commented Jan 21, 2018

The endianness of getBalance was broken, but the test was passing because 0x0500000000000000 in little endian is equal to the first 64 bits of 0x00000000000000056bc75e2d63100000 in big endian.

@axic
Copy link
Member

axic commented Jan 23, 2018

I think this isn't the right way to do it because the main purpose of the u256 class is to hide endinaness issues. If you change the endinaness for geBalance you need to do the same for getCallValue and all the call/create interfaces.

Actually it seems this commit broke it: 218378e#diff-efe23f6b663b1ac76c853f19c9362733

The le to be change inu256.js should be reversed.

@lrettig
Copy link
Member

lrettig commented May 23, 2018

After reverting the change in 218378e#diff-efe23f6b663b1ac76c853f19c9362733, I see the following when running the vmTests:

1..1793
# tests 1793
# pass  1726
# fail  67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants