comparison main.py @ 7:e4afde8d5a7e

restart project
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Sun, 24 Oct 2021 15:19:56 +0200
parents 5f6d1a28051a
children 4d259e84160d
comparison
equal deleted inserted replaced
6:5f6d1a28051a 7:e4afde8d5a7e
1 import os
2 from src.puppy.block import read_block
3
4
5 def main(): 1 def main():
6 file_path = '/Users/dennis/Bitcoin/blocks/blk00000.dat' 2 file_path = '/Users/dennis/Bitcoin/blocks/blk00000.dat'
7 3
8 with open(file_path, 'rb') as f: 4 with open(file_path, 'rb') as f:
9 number_of_bytes_in_file = os.path.getsize(file_path) 5 pass
10
11 while f.tell() < number_of_bytes_in_file:
12 block = read_block(f)
13 6
14 7
15 if __name__ == '__main__': 8 if __name__ == '__main__':
16 main() 9 main()