Update query.py
This commit is contained in:
parent
93d53bdd87
commit
f020fcf977
6
query.py
6
query.py
@ -13,11 +13,10 @@ Not currently documented; might become easier to use in future.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from server.env import Env
|
from server.env import Env
|
||||||
from server.block_processor import BlockProcessor
|
from server.DB import DB
|
||||||
from lib.hash import hash_to_str
|
from lib.hash import hash_to_str
|
||||||
|
|
||||||
|
|
||||||
@ -40,9 +39,8 @@ def count_entries(db):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
env = Env()
|
env = Env()
|
||||||
|
bp = DB(env)
|
||||||
coin = env.coin
|
coin = env.coin
|
||||||
os.chdir(env.db_dir)
|
|
||||||
bp = BlockProcessor(env, None)
|
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
count_entries(bp.db)
|
count_entries(bp.db)
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user