diff options
author | Carl Dong <contact@carldong.me> | 2022-06-21 10:37:10 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-06-28 15:42:40 -0400 |
commit | 1ecc77321deb61b9f6888e4e10752b9d972fd26e (patch) | |
tree | dd7b4c8f4800c3d250c2c7cd477c7d0080bda8e7 /test | |
parent | aa9141cd8185cb7ad532bc16feb9d302b05d9697 (diff) | |
download | bitcoin-1ecc77321deb61b9f6888e4e10752b9d972fd26e.tar.xz |
scripted-diff: Rename DEFAULT_MEMPOOL_EXPIRY to indicate time unit
Better to be explicit when it comes to time to avoid unintentional bugs.
-BEGIN VERIFY SCRIPT-
find_regex="DEFAULT_MEMPOOL_EXPIRY" \
&& git grep -l -E "$find_regex" \
| xargs sed -i -E "s@$find_regex@\0_HOURS@g"
-END VERIFY SCRIPT-
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/mempool_expiry.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/mempool_expiry.py b/test/functional/mempool_expiry.py index f301b29c25..47ae0c762b 100755 --- a/test/functional/mempool_expiry.py +++ b/test/functional/mempool_expiry.py @@ -5,7 +5,7 @@ """Tests that a mempool transaction expires after a given timeout and that its children are removed as well. -Both the default expiry timeout defined by DEFAULT_MEMPOOL_EXPIRY and a user +Both the default expiry timeout defined by DEFAULT_MEMPOOL_EXPIRY_HOURS and a user definable expiry timeout via the '-mempoolexpiry=<n>' command line argument (<n> is the timeout in hours) are tested. """ @@ -20,7 +20,7 @@ from test_framework.util import ( ) from test_framework.wallet import MiniWallet -DEFAULT_MEMPOOL_EXPIRY = 336 # hours +DEFAULT_MEMPOOL_EXPIRY_HOURS = 336 # hours CUSTOM_MEMPOOL_EXPIRY = 10 # hours @@ -98,8 +98,8 @@ class MempoolExpiryTest(BitcoinTestFramework): def run_test(self): self.log.info('Test default mempool expiry timeout of %d hours.' % - DEFAULT_MEMPOOL_EXPIRY) - self.test_transaction_expiry(DEFAULT_MEMPOOL_EXPIRY) + DEFAULT_MEMPOOL_EXPIRY_HOURS) + self.test_transaction_expiry(DEFAULT_MEMPOOL_EXPIRY_HOURS) self.log.info('Test custom mempool expiry timeout of %d hours.' % CUSTOM_MEMPOOL_EXPIRY) |