diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-03-02 12:20:34 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2017-03-03 13:51:41 -0500 |
commit | e57a1fd8999800b3fc744d45bb96354cae294032 (patch) | |
tree | e3c79a873e1f83eefe2f86506b87125a9c02679a /qa/rpc-tests/import-rescan.py | |
parent | 3fabae742567ecc060618c23d5fc01518fe96e60 (diff) | |
download | bitcoin-e57a1fd8999800b3fc744d45bb96354cae294032.tar.xz |
Define 7200 second timestamp window constant
Diffstat (limited to 'qa/rpc-tests/import-rescan.py')
-rwxr-xr-x | qa/rpc-tests/import-rescan.py | 6 |
1 files changed, 3 insertions, 3 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) |