The wallet/test_accounts.py::test_discover is especially slow. Profiling shows that it's due to many calls to the underlying secp256k1 code, written in pure Python.
Since we're not testing the secp256k1 code in the higher-level test, a workaround would be to monkeypatch the calls to ExtendedKey.child, making them return precomputed values.
A similar approach could be used in other slow tests.
Several unit tests are too slow:
The
wallet/test_accounts.py::test_discover
is especially slow. Profiling shows that it's due to many calls to the underlyingsecp256k1
code, written in pure Python.Since we're not testing the
secp256k1
code in the higher-level test, a workaround would be to monkeypatch the calls toExtendedKey.child
, making them return precomputed values.A similar approach could be used in other slow tests.