Skip to content

Commit 3613c87

Browse files
authored
Update blockchain-parser.py
1 parent 52c1193 commit 3613c87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

blockchain-parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ def read_varint(file):
7474
tmpHex = ''
7575
fSize = os.path.getsize(t)
7676
while f.tell() != fSize:
77-
tmpHex = read_bytes(f,4)
78-
resList.append('Magic number = ' + tmpHex)
77+
while tmpHex != 'D9B4BEF9': # it is for to skip zeroes in some blk files
78+
tmpHex = read_bytes(f,4)
79+
resList.append('Magic number = ' + tmpHex)
7980
tmpHex = read_bytes(f,4)
8081
resList.append('Block size = ' + tmpHex)
8182
tmpPos3 = f.tell()

0 commit comments

Comments
 (0)