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

OverflowError #10

Open
tommy1900 opened this issue Mar 6, 2018 · 1 comment
Open

OverflowError #10

tommy1900 opened this issue Mar 6, 2018 · 1 comment

Comments

@tommy1900
Copy link

I ran it in both python2 and python3(I modified the code to make it compatible with python3). This code works for those early blocks(blk00000.dat to blk00255.dat maybe), but it won't work for the latest blocks. Every time I run "python sight.py blk01192.dat", it will give me the error:
OverflowError: Python int too large to convert to C long

or if I run it in python3:

OverflowError: cannot fit 'int' into an index-sized integer

The error is caused by this line:

self.scriptSig = blockchain.read(self.scriptLen)
I put a print command below after the self.scriptLen variable been defined. Normally, the self.scriptlen has a value below 300, like

204
19
187
163
71
118
129
128
143
197
111
Then 18446744068566526377 this value jump out and the overflow error occur, anyone familiar with blockchain data can explain this to me? Right now I'm struggling and have no idea how to fix this, maybe there is some special case I need to put in the code?

@tenthirtyone
Copy link
Owner

What's the block number?

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

No branches or pull requests

2 participants