1
0
Fork 0
This repository has been archived on 2024-12-18. You can view files and clone it, but cannot push or open issues or pull requests.
mining-companion/state.py

13 lines
247 B
Python
Raw Normal View History

import json
def write_state(filename, block_number):
data = {'block': block_number}
with open(filename, 'w') as fd:
json.dump(data, fd)
def read_state(filename):
with open(filename, 'r') as fd:
return json.load(fd)