show more info in show-blocks.py script

This commit is contained in:
Kevin Froman 2020-11-03 04:38:35 +00:00
parent 8d839f62c9
commit 04105a2b70

View File

@ -6,6 +6,11 @@ if not os.path.exists('onionr.sh'):
os.chdir('../') os.chdir('../')
sys.path.append("src/") sys.path.append("src/")
from coredb.blockmetadb import get_block_list from coredb.blockmetadb import get_block_list
from onionrblocks.onionrblockapi import Block
for bl in get_block_list(): for bl in get_block_list():
print(bl) 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)