bitcoin/test/functional/test_framework
MacroFake d24318a40c
Merge bitcoin/bitcoin#24941: test: MiniWallet: support skipping mempool checks (feature_fee_estimation.py performance fix)
a498acce45 test: MiniWallet: skip mempool check if `mempool_valid=False` (Sebastian Falbesoner)
01552e8f67 test: MiniWallet: always rehash after signing (P2PK mode) (Sebastian Falbesoner)

Pull request description:

  MiniWallet's core method for creating txs (`create_self_transfer`) right now always executes the `testmempoolaccept` RPC to check for mempool validity or invalidity. In some test cases where we use MiniWallet to create a huge number of transactions this can lead to performance issues, in particular feature_fee_estimation.py where the execution time after MiniWallet usage (PR #24817) doubled, see https://github.com/bitcoin/bitcoin/issues/24828#issuecomment-1100058100, https://github.com/bitcoin/bitcoin/issues/24828#issuecomment-1100301980. This PR mitigates this by skipping the mempool check if the parameter `mempool_valid` is set to `False`.

  As a preparatory commit, the test feature_csv_activation.py has to be adapted w.r.t. to rehashing of transactions, as we now hash all transactions immediately in `create_self_transfer` in order to get the txid (before we relied on the result of `testmempoolaccept`).

  On my machine, this decreases the execution time quite noticably:

  master branch:
  ```
  $ time ./test/functional/feature_fee_estimation.py
  real    3m20.771s
  user    2m52.360s
  sys     0m39.340s
  ```

  PR branch:
  ```
  $ time ./test/functional/feature_fee_estimation.py
  real    2m1.386s
  user    1m42.510s
  sys     0m22.980s
  ```

  Partly fixes #24828 (hopefully).

ACKs for top commit:
  danielabrozzoni:
    tACK a498acce45

Tree-SHA512: f20c358ba42b2ded86175f46ff3ff9eaefb84175cbd1c2624f44904c8d8888e67ce64d6dcbb26aabbf07906e6f5bdea40353eba9ae668618cadcfc517ef7201b
2022-05-03 09:59:52 +02:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py test: throw ValueError for invalid base58 checksum 2022-04-05 20:07:33 +02:00
authproxy.py test: Remove Windows workaround in authproxy 2021-09-25 09:33:16 +02:00
bdb.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blocktools.py test: refactor: add constant for sequence number SEQUENCE_FINAL 2022-01-11 15:28:28 +01:00
coverage.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
key.py tests: add deterministic signing mode to ECDSA 2021-11-12 12:04:20 -05:00
messages.py test: create txs with current nVersion (2) by default 2022-01-11 16:22:27 +01:00
muhash.py test: Change MuHash Python implementation to match cpp version again 2020-12-22 01:48:34 +01:00
netutil.py test: remove import socket in test_ipv6_local 2022-02-14 19:27:33 -03:00
p2p.py Merge bitcoin/bitcoin#21327: net_processing: ignore transactions while in IBD 2021-11-30 19:09:15 +01:00
ripemd160.py Add pure Python RIPEMD-160 2021-12-08 14:29:34 -05:00
script.py Simplify wallet_taproot.py functional test 2022-01-12 11:09:41 -05:00
script_util.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
segwit_addr.py Use Bech32m encoding for v1+ segwit addresses 2021-03-16 10:48:36 -07:00
siphash.py Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
socks5.py scripted-diff: Update copyright in ./test 2019-03-02 10:58:35 -05:00
test_framework.py test: add is_bitcoin_util_compiled helper 2022-04-11 21:54:49 +02:00
test_node.py test: stop node before calling assert_start_raises_init_error 2022-04-29 22:50:26 +02:00
test_shell.py TestShell: Return self from setup() 2019-11-05 12:55:52 +01:00
util.py test: use MiniWallet for feature_maxuploadtarget.py 2022-03-11 16:14:48 +01:00
wallet.py test: MiniWallet: skip mempool check if mempool_valid=False 2022-04-22 15:07:10 +02:00
wallet_util.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00