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
address.py test: throw `ValueError` for invalid base58 checksum 2022-04-05 20:07:33 +02:00
authproxy.py
bdb.py
bip340_test_vectors.csv
blocktools.py
coverage.py
descriptors.py
key.py
messages.py
muhash.py
netutil.py test: remove `import socket` in test_ipv6_local 2022-02-14 19:27:33 -03:00
p2p.py
ripemd160.py
script.py
script_util.py
segwit_addr.py
siphash.py
socks5.py
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
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