aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-06 10:01:25 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-06 10:02:05 +0100
commit5a6af317225486fb56c6758eb8ac841ee0fa5733 (patch)
tree229c6d86df111bb845f5a48138b9ba495f4f9e20 /qa
parent56ab672b59dae168a0a34c40b5ba3aa5034bbd76 (diff)
parente57a1fd8999800b3fc744d45bb96354cae294032 (diff)
downloadbitcoin-5a6af317225486fb56c6758eb8ac841ee0fa5733.tar.xz
Merge #9908: Define 7200 second timestamp window constant
e57a1fd Define 7200 second timestamp window constant (Russell Yanofsky) Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
Diffstat (limited to 'qa')
-rwxr-xr-xqa/rpc-tests/import-rescan.py6
-rwxr-xr-xqa/rpc-tests/pruning.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/qa/rpc-tests/import-rescan.py b/qa/rpc-tests/import-rescan.py
index 7ca61824c9..64e0eec61e 100755
--- a/qa/rpc-tests/import-rescan.py
+++ b/qa/rpc-tests/import-rescan.py
@@ -56,7 +56,7 @@ class Variant(collections.namedtuple("Variant", "call data rescan prune")):
"scriptPubKey": {
"address": self.address["address"]
},
- "timestamp": timestamp + RESCAN_WINDOW + (1 if self.rescan == Rescan.late_timestamp else 0),
+ "timestamp": timestamp + TIMESTAMP_WINDOW + (1 if self.rescan == Rescan.late_timestamp else 0),
"pubkeys": [self.address["pubkey"]] if self.data == Data.pub else [],
"keys": [self.key] if self.data == Data.priv else [],
"label": self.label,
@@ -108,7 +108,7 @@ ImportNode = collections.namedtuple("ImportNode", "prune rescan")
IMPORT_NODES = [ImportNode(*fields) for fields in itertools.product((False, True), repeat=2)]
# Rescans start at the earliest block up to 2 hours before the key timestamp.
-RESCAN_WINDOW = 2 * 60 * 60
+TIMESTAMP_WINDOW = 2 * 60 * 60
class ImportRescanTest(BitcoinTestFramework):
@@ -141,7 +141,7 @@ class ImportRescanTest(BitcoinTestFramework):
self.nodes[0].generate(1)
assert_equal(self.nodes[0].getrawmempool(), [])
timestamp = self.nodes[0].getblockheader(self.nodes[0].getbestblockhash())["time"]
- set_node_times(self.nodes, timestamp + RESCAN_WINDOW + 1)
+ set_node_times(self.nodes, timestamp + TIMESTAMP_WINDOW + 1)
self.nodes[0].generate(1)
sync_blocks(self.nodes)
diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py
index ace8ced422..d4924d058c 100755
--- a/qa/rpc-tests/pruning.py
+++ b/qa/rpc-tests/pruning.py
@@ -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