Onionr/scripts/show-blocks.py
Kevin Froman a3ce191ed3 renamed old block api due to namespace conflict
fix onboarding not using optimize cpu option
2021-01-21 20:23:58 +00:00

17 lines
406 B
Python

import sys
import os
import stem
if not os.path.exists('onionr.sh'):
os.chdir('../')
sys.path.append("src/")
from coredb.blockmetadb import get_block_list
from oldblocks.onionrblockapi import Block
for bl in get_block_list():
bl_obj = Block(bl, decrypt=False)
b_type = bl_obj.getType()
if not b_type:
b_type = "encrypted"
print(bl + " - " + str(bl_obj.date) + " - " + b_type)