Example #1
0
def check_chain_version(config):
    key = '__chain_version__'
    chain_version = str(Packeter.ETHEREUM_PROTOCOL_VERSION)
    db = DB(db_path(config.get('misc', 'data_dir')))
    if not key in db:
        db.put(key, chain_version)
    if db.get(key) != chain_version:
        log.critical('db version mismatch', db_version=db.get(
            key), chain_version=chain_version, db_path=db_path)
        time.sleep(5)
Example #2
0
def check_chain_version(config):
    key = '__chain_version__'
    chain_version = str(Packeter.ETHEREUM_PROTOCOL_VERSION)
    db = DB(db_path(config.get('misc', 'data_dir')))
    if not key in db:
        db.put(key, chain_version)
    if db.get(key) != chain_version:
        log.critical('db version mismatch',
                     db_version=db.get(key),
                     chain_version=chain_version,
                     db_path=db_path)
        time.sleep(5)
Example #3
0
def check_chain_version(config):
    key = '__chain_version__'
    chain_version = str(Packeter.ETHEREUM_PROTOCOL_VERSION)
    db_path = get_db_path()
    db = DB(db_path)
    if not key in db:
        db.put(key, chain_version)
    if db.get(key) != chain_version:
        print \
"""
ATTENTION --------------------------------------------------------------------
the chain in the db (V:%r) doesn't match the the software version (V:%r)
This may lead to unexpected errors.
Consider to delete the db directory: %s
--------- --------------------------------------------------------------------
""" % (db.get(key), chain_version, db_path)
        time.sleep(5)
Example #4
0
def check_chain_version(config):
    key = '__chain_version__'
    chain_version = str(Packeter.ETHEREUM_PROTOCOL_VERSION)
    db_path = get_db_path()
    db = DB(db_path)
    if not key in db:
        db.put(key, chain_version)
    if db.get(key) != chain_version:
        print \
"""
ATTENTION --------------------------------------------------------------------
the chain in the db (V:%r) doesn't match the the software version (V:%r)
This may lead to unexpected errors.
Consider to delete the db directory: %s
--------- --------------------------------------------------------------------
""" % (db.get(key), chain_version, db_path)
        time.sleep(5)