aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_fee_estimation.py
AgeCommit message (Collapse)Author
2024-02-28test: add option to speed up tx relay/mempool syncbrunoerg
when `self.noban_tx_relay=True`, the following flag `-whitelist=noban,in,out@127.0.0.1`is added to `extra_args` to speed up tx relay/mempool sync.
2023-06-21scripted-diff: Use wallets_path and chain_path where possibleMarcoFalke
Instead of passing the datadir and chain name to os.path.join, just use the existing properties, which are the same. -BEGIN VERIFY SCRIPT- sed -i --regexp-extended 's|\.datadir, self\.chain, .wallets.|.wallets_path|g' $(git grep -l '\.datadir, self\.chain,') sed -i --regexp-extended 's|\.datadir, self\.chain,|.chain_path,|g' $(git grep -l '\.datadir, self\.chain,') -END VERIFY SCRIPT-
2023-06-14test: ensure old fee_estimate.dat not read on restart and flushedismaelsadeeq
This commit adds tests to ensure that old fee_estimates.dat files are not read and that fee_estimates are periodically flushed to the fee_estimates.dat file. Additionaly it tests the -regtestonly option -acceptstalefeeestimates.
2023-01-16test: add `rescan_utxos` in MiniWallet's initializationkouloumos
this simplifies usage when MiniWallet is used with a pre-mined chain.
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-12-09tests: Use batched RPC in feature_fee_estimationAndrew Chow
feature_fee_estimation has a lot of loops that hit the RPC many times in succession in order to setup scenarios. Using batched requests for these can reduce the test's runtime without effecting the test's behavior.
2022-11-17test: Changed small_txpuzzle_randfee to return the virtual size instead of ↵Randall Naar
the transaction hex for feerate calculation.
2022-06-27test: Return new_utxos from create_self_transfer_multi in MiniWalletMacroFake
2022-06-21test: Remove from_node from create_self_transfer* MiniWallet helpersMacroFake
The from_node argument is no longer used as of commit a55606c3bdbfdf660b093bc2a618d537ffae7f26
2022-04-10test: use MiniWallet for feature_fee_estimation.pySebastian Falbesoner
This test can now be run even with the Bitcoin Core wallet disabled.
2021-12-09qa: replace assert with test framework assertion helpers in fee estimation testAntoine Poinsot
2021-12-09qa: fee estimation with RBF test cleanupsAntoine Poinsot
Followups to #22539 Co-Authored-By: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2021-12-09qa: don't mine non standard txs in fee estimation testAntoine Poinsot
We don't need dust outputs anymore. Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-12-09qa: pass scriptsig directly to txins constructor in fee estimation testAntoine Poinsot
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-12-09qa: split coins in a single tx in fee estimation testAntoine Poinsot
This simplifies the code, and slightly speeds up the test. Running `./test/functional/test_runner.py -j15 $(printf 'feature_fee_estimation %.0s' {1..15})` on master 3 times gives: - Before: ALL | ✓ Passed | 788 s (accumulated) ALL | ✓ Passed | 818 s (accumulated) ALL | ✓ Passed | 873 s (accumulated) - After: ALL | ✓ Passed | 763 s (accumulated) ALL | ✓ Passed | 798 s (accumulated) ALL | ✓ Passed | 731 s (accumulated) Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-12-09qa: use a single p2sh script in fee estimation testAntoine Poinsot
Using 2 different scripts is unnecessary complication Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-12-09qa: remove a redundant condition in fee estimation testAntoine Poinsot
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-11-10scripted-diff: Remove redundant sync_all and sync_blocksMarcoFalke
The sync calls are redundant after a call to generate, because generate already syncs itself. -BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's/(generate[^\n]*\)[^\n]*)(\n|\s)+self.sync_(all|blocks)\([^\)]*\)\n/\1\n/g' $(git grep -l generate ./test) -END VERIFY SCRIPT-
2021-10-29test: Implicitly sync after generate*, unless opted outMarcoFalke
2021-09-29qa: test fee estimation with replacement transactionsAntoine Poinsot
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-09-29qa: split run_test into smaller partsAntoine Poinsot
Let's not have run_test get into a giant function as we add more tests Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-09-28update estimatesmartfee rpc to return max of estimateSmartFee, mempoolMinFee ↵pranabp-bit
and minRelayTxFee. This will provide better estimates which would be closer to fee paid in actual transactions. The test has also been changed such that when the node is restarted with a high mempoolMinFee, the estimatesmartfee still returns a feeRate greater than or equal to the mempoolMinFee, minRelayTxFee.(just like the feeRate of actual transactions)
2021-09-02scripted-diff: Use generate* from TestFrameworkMarcoFalke
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i \ 's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \ $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf') -END VERIFY SCRIPT-
2021-08-18test: use f-strings in feature_fee_estimation.pyfanquake
2021-07-05test: use script_util helpers for creating P2SH scriptsSebastian Falbesoner
2021-06-21test: remove `ToHex` helper, use .serialize().hex() insteadSebastian Falbesoner
2020-12-03init: don't create a CBlockPolicyEstimator if we don't relay transactionsAntoine Poinsot
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-20scripted-diff: test: Replace uses of (dis)?connect_nodes globalPrayank
-BEGIN VERIFY SCRIPT- # max-depth=0 excludes test/functional/test_framework/... FILES=$(git grep -l --max-depth 0 "connect_nodes" test/functional) # Replace (dis)?connect_nodes(self.nodes[a], b) with self.(dis)?connect_nodes(a, b) sed -i 's/\b\(dis\)\?connect_nodes(self\.nodes\[\(.*\)\]/self.\1connect_nodes(\2/g' $FILES # Remove imports in the middle of a line sed -i 's/\(dis\)\?connect_nodes, //g' $FILES sed -i 's/, \(dis\)\?connect_nodes//g' $FILES # Remove imports on a line by themselves sed -i '/^\s*\(dis\)\?connect_nodes,\?$/d' $FILES sed -i '/^from test_framework\.util import connect_nodes$/d' $FILES -END VERIFY SCRIPT- Co-authored-by: Elliott Jin <elliott.jin@gmail.com>
2020-09-29test: Get rid of default wallet hacksRussell Yanofsky
- Get rid of hardcoded wallet "" names and -wallet="" args - Get rid of setup_nodes (-wallet, -nowallet, -disablewallet) argument rewriting Motivation: - Simplify test framework behavior so it's easier to write new tests without having arguments mangled by the framework - Make tests more readable, replacing unexplained "" string literals with default_wallet_name references - Make it trivial to update default wallet name and wallet data filename for sqlite #19077 testing - Stop relying on -wallet arguments to create wallets, so it is easy to change -wallet option in the future to only load existing wallets not create new ones (to avoid accidental wallet creation, and encourage use of wallet encryption and descriptor features)
2020-09-08Do not create default walletAndrew Chow
No longer create a default wallet. The default wallet will still be loaded if it exists and not other wallets were specified (anywhere, including settings.json, bitcoin.conf, and command line). Tests are updated to be started with -wallet= if they need the default wallet. Added test to wallet_startup.py testing that no default wallet is created and that it is loaded if it exists and no other wallets were specified.
2020-08-06refactor: test: use _ variable for unused loop countersSebastian Falbesoner
substitutes "for x in range(N):" by "for _ in range(N):" indicates to the reader that a block is just repeated N times, and that the loop counter is not used in the body
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-03-11Merge #13693: [test] Add coverage to estimaterawfee and estimatesmartfeeMarcoFalke
111880aaf7e12a12f0797f1b19673e3d96328edd [test] Add coverage to estimaterawfee and estimatesmartfee (Ben Woosley) Pull request description: This adds light functional coverage to estimaterawfee - a subset of the testing applied to estimatesmartfee, and argument validation testing to both estimaterawfee and estimatesmartfee. One valid estimatesmartfee signature test is commented out because it fails currently. Extracted from #12940 Top commit has no ACKs. Tree-SHA512: 361a883457b28b2dc75081666e49d6dc6b5d76eed40d858abe2dd4f35ece152cf1f99c94480a91f42a896aa2a73cf55f57921316fe66970b2d7ba691a3b17e2d
2020-02-26test: Reduce unneeded whitelist permissions in testsMarcoFalke
2019-10-09[test] Add coverage to estimaterawfee and estimatesmartfeeBen Woosley
This adds light functional coverage to estimaterawfee - a subset of the testing applied to estimatesmartfee, and argument validation testing to both estimaterawfee and estimatesmartfee. One valid estimatesmartfee signature test is commented out because it fails currently.
2019-08-02test: Explain why -whitelist is used in feature_fee_estimationMarcoFalke
Also, Remove seemingly unused and undocumented -maxorphantx=1000
2019-08-02test: Format feature_fee_estimation with pep8MarcoFalke
2019-08-01Test: Set -acceptnonstdtxn in feature_fee_estimationMarcoFalke
2019-04-09test: Remove unused importsMarcoFalke
2019-04-09scripted-diff: use self.sync_* methodsMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py) sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py) sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l sync_blocks ./test/functional/*.py) sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py) -END VERIFY SCRIPT-
2019-03-14wallet/rpc: add maxfeerate parameter to sendrawtransactionKarl-Johan Alm
2018-11-01[tests] Move deterministic address import to setup_nodesJohn Newbery
This requires a small changes to a few tests, but means that deterministic addresses will always be imported (unless setup_nodes behaviour is explicitly overridden).
2018-09-10qa: Run all tests even if wallet is not compiledMarcoFalke
2018-09-10qa: Premine to deterministic address with -disablewalletMarcoFalke
2018-08-13tests: Use explicit importspracticalswift
2018-07-27Update copyright headers to 2018DrahtBot
2018-03-26[Tests] Use blockmaxweight where tests previously had blockmaxsizeConor Scott
2018-03-22[config] Remove blockmaxsize optionJohn Newbery
The blockmaxsize option was marked as deprecated in V0.15.1, and code was added to convert provided blockmaxsize into blockmaxweight. However, this code was incorrectly implemented, and blockmaxsize was silently ignored. No users have complained about blockmaxsize being ignored, so just remove it in V0.17.
2018-03-21tests: Remove unused argument max_invalid from check_estimates(...)practicalswift