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?
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?