view main.py @ 6:5f6d1a28051a

add python package config files
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Sun, 24 Oct 2021 15:18:54 +0200
parents 1a8d94b500d8
children e4afde8d5a7e
line wrap: on
line source

import os
from src.puppy.block import read_block


def main():
    file_path = '/Users/dennis/Bitcoin/blocks/blk00000.dat'

    with open(file_path, 'rb') as f:
        number_of_bytes_in_file = os.path.getsize(file_path)

        while f.tell() < number_of_bytes_in_file:
            block = read_block(f)


if __name__ == '__main__':
    main()