Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Dec 17, 2024
1 parent 72498c5 commit c83a532
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion counterparty-core/counterpartycore/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def initialise_config(
if not cache_dir:
cache_dir = appdirs.user_cache_dir(appauthor=config.XCP_NAME, appname=config.APP_NAME)
if not os.path.isdir(cache_dir):
os.makedirs(config.CACHE_DIR, mode=0o755)
os.makedirs(cache_dir, mode=0o755)
config.CACHE_DIR = cache_dir

# testnet
Expand Down
5 changes: 4 additions & 1 deletion counterparty-core/counterpartycore/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def server_db(request, cp_server, api_server):
cursor = db.cursor()
cursor.execute("""BEGIN""")
util_test.reset_current_block_index(db)
config.CACHE_DIR = os.path.dirname(request.module.FIXTURE_DB)

request.addfinalizer(lambda: cursor.execute("""ROLLBACK"""))
request.addfinalizer(lambda: util_test.reset_current_block_index(db))
Expand All @@ -245,6 +246,7 @@ def api_server(request, cp_server):

config.RPC_PORT = TEST_RPC_PORT = TEST_RPC_PORT + 1
server.configure_rpc(config.RPC_PASSWORD)
config.CACHE_DIR = os.path.dirname(request.module.FIXTURE_DB)

print("api_server", config.DATABASE, config.STATE_DATABASE)

Expand Down Expand Up @@ -323,7 +325,7 @@ def api_server_v2(request, cp_server):
"max_log_file_rotations": 20,
"log_exclude_filters": None,
"log_include_filters": None,
"cache_dir": None,
"cache_dir": os.path.dirname(request.module.FIXTURE_DB),
}
server_config = (
default_config
Expand All @@ -336,6 +338,7 @@ def api_server_v2(request, cp_server):
)

config.STATE_DATABASE = config.STATE_DATABASE.replace(".testnet.db", ".db")
config.CACHE_DIR = os.path.dirname(request.module.FIXTURE_DB)

if os.path.exists(config.STATE_DATABASE):
os.unlink(config.STATE_DATABASE)
Expand Down

0 comments on commit c83a532

Please sign in to comment.