Skip to content

Commit

Permalink
Lower checkpoints to /30 blocks after HF
Browse files Browse the repository at this point in the history
  • Loading branch information
EggPool committed Nov 12, 2019
1 parent dd0140c commit 6fff5bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions essentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
from polysign.signer import SignerType
from polysign.signerfactory import SignerFactory

__version__ = "0.0.6"
__version__ = "0.0.7"

"""
0.0.7 : decrease checkpoint limit to 30 blocks at 1450000 (meaning max 59 blocks rollback)
"""

"""
For temp. code compatibility, dup code moved to polysign module
Expand Down Expand Up @@ -118,8 +122,13 @@ def round_down(number, order):


def checkpoint_set(node):
node.checkpoint = round_down(node.last_block, 1000) - 1000
node.logger.app_log.warning(f"Checkpoint set to {node.checkpoint}")
limit = 30
if node.last_block < 1450000:
limit = 1000
checkpoint = round_down(node.last_block, limit) - limit
if checkpoint != node.checkpoint:
node.checkpoint = checkpoint
node.logger.app_log.warning(f"Checkpoint set to {node.checkpoint}")


def ledger_balance3(address, cache, db_handler):
Expand Down
2 changes: 1 addition & 1 deletion 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.4.0.2" # Post fork candidate 2
VERSION = "4.4.0.3" # Post fork candidate 3

import functools
import glob
Expand Down

0 comments on commit 6fff5bb

Please sign in to comment.