Define 7200 second timestamp window constant

This commit is contained in:
Russell Yanofsky
2017-03-02 12:20:34 -05:00
parent 3fabae7425
commit e57a1fd899
8 changed files with 27 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ MIN_BLOCKS_TO_KEEP = 288
# Rescans start at the earliest block up to 2 hours before a key timestamp, so
# the manual prune RPC avoids pruning blocks in the same window to be
# compatible with pruning based on key creation time.
RESCAN_WINDOW = 2 * 60 * 60
TIMESTAMP_WINDOW = 2 * 60 * 60
def calc_usage(blockdir):
@@ -242,7 +242,7 @@ class PruneTest(BitcoinTestFramework):
def height(index):
if use_timestamp:
return node.getblockheader(node.getblockhash(index))["time"] + RESCAN_WINDOW
return node.getblockheader(node.getblockhash(index))["time"] + TIMESTAMP_WINDOW
else:
return index