diff options
| author | Russell Yanofsky <[email protected]> | 2017-02-21 12:57:30 -0500 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-02-23 10:39:20 +0100 |
| commit | 599c69abe3101512eeee13733c0f58eb3e363eae (patch) | |
| tree | 847cd4a976c908ad1ddcc0278f6b5a91edd4391c | |
| parent | [Trivial] Remove incorrect help message from gettxoutproof() (diff) | |
| download | discoin-599c69abe3101512eeee13733c0f58eb3e363eae.tar.xz discoin-599c69abe3101512eeee13733c0f58eb3e363eae.zip | |
Fix pruning test broken by 2 hour manual prune window
Regression happened in 91fb506 Add two hour buffer to manual pruning.
Github-Pull: #9820
Rebased-From: 874c7363d794c18a3b46d3d2a03f19c88f3a20cf
| -rwxr-xr-x | qa/rpc-tests/pruning.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py index 9d155478e..1e6d41918 100755 --- a/qa/rpc-tests/pruning.py +++ b/qa/rpc-tests/pruning.py @@ -18,6 +18,11 @@ import os 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 + def calc_usage(blockdir): return sum(os.path.getsize(blockdir+f) for f in os.listdir(blockdir) if os.path.isfile(blockdir+f)) / (1024. * 1024.) @@ -239,7 +244,7 @@ class PruneTest(BitcoinTestFramework): def height(index): if use_timestamp: - return node.getblockheader(node.getblockhash(index))["time"] + return node.getblockheader(node.getblockhash(index))["time"] + RESCAN_WINDOW else: return index |