mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Define 7200 second timestamp window constant
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user