Skip to content

Commit

Permalink
rename FORCE flag to discourage its use
Browse files Browse the repository at this point in the history
  • Loading branch information
skozin committed Mar 10, 2021
1 parent 1b5ad8d commit 1698f0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
await_time_in_sec = int(os.getenv('SLEEP', DEFAULT_SLEEP))

run_as_daemon = int(os.getenv('DAEMON', 0))
force = int(os.getenv('FORCE', 0))
force = int(os.getenv('FORCE_DO_NOT_USE_PRODUCTION', 0))

dry_run = member_privkey is None

Expand Down Expand Up @@ -141,7 +141,7 @@
logging.info('DAEMON=0 Running in single iteration mode (will exit after reporting).')

if force:
logging.info('FORCE=1 Running in enforced mode.')
logging.info('FORCE_DO_NOT_USE_PRODUCTION=1 Running in enforced mode.')
logging.warning("In enforced mode TX gets always sent even if it looks suspicious. NEVER use it in production!")

logging.info(f'ETH1_NODE={eth1_provider}')
Expand Down Expand Up @@ -229,7 +229,7 @@ def prompt(prompt_message, prompt_end):
else:
logging.warning('Cannot report suspicious data in DAEMON mode for safety reasons.')
logging.warning('You can submit it interactively (with DAEMON=0) and interactive [y/n] prompt.')
logging.warning("In DAEMON mode it's possible with enforcement flag (FORCE=1). Never use it in production.")
logging.warning("In DAEMON mode it's possible with enforcement flag (FORCE_DO_NOT_USE_PRODUCTION=1). Never use it in production.")
else:
sign_and_send_tx(tx)
else:
Expand Down

0 comments on commit 1698f0e

Please sign in to comment.