Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- restore warning in case privatenet database is different from the one you're connecting to (e.g. because you restarted your docker image or single node)
  • Loading branch information
jseagrave21 committed Sep 24, 2019
1 parent cc50060 commit 132080d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions neo/bin/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from neo.Wallets.utils import to_aes_key
from neo.Implementations.Wallets.peewee.UserWallet import UserWallet
from neo.Network.p2pservice import NetworkService
from neo.Settings import settings
from neo.Settings import settings, PrivnetConnectionError
from neo.Utils.plugin import load_class_from_path
from neo.Wallets.utils import to_aes_key
from contextlib import suppress
Expand Down Expand Up @@ -152,7 +152,11 @@ async def setup_and_start(loop):
elif args.testnet:
settings.setup_testnet()
elif args.privnet:
settings.setup_privnet()
try:
settings.setup_privnet()
except PrivnetConnectionError as e:
print(e)
raise SystemExit
elif args.coznet:
settings.setup_coznet()

Expand Down

0 comments on commit 132080d

Please sign in to comment.