Skip to content

Commit

Permalink
Update mainnet version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
EggPool authored Nov 9, 2019
1 parent c4a18ca commit 971098d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions node.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# issues with db? perhaps you missed a commit() or two


VERSION = "4.3.0.9" # Post fork candidate 9
VERSION = "4.3.0.10" # Post fork candidate 10

import functools
import glob
Expand Down Expand Up @@ -1665,17 +1665,17 @@ def setup_net_type():
node.index_db = "static/index.db"

if node.is_mainnet:
# Allow only 20 and up
if node.version != 'mainnet0020':
node.version = 'mainnet0020' # Force in code.
if "mainnet0020" not in node.version_allow:
node.version_allow = ['mainnet0020', 'mainnet0021']
# Allow only 21 and up
if node.version != 'mainnet0021':
node.version = 'mainnet0021' # Force in code.
if "mainnet0021" not in node.version_allow:
node.version_allow = ['mainnet0021', 'mainnet0022']
# Do not allow bad configs.
if not 'mainnet' in node.version:
node.logger.app_log.error("Bad mainnet version, check config.txt")
sys.exit()
num_ver = just_int_from(node.version)
if num_ver <20:
if num_ver <21:
node.logger.app_log.error("Too low mainnet version, check config.txt")
sys.exit()
for allowed in node.version_allow:
Expand Down

0 comments on commit 971098d

Please sign in to comment.