Test suite fails because of missing ripemd160 in hashlib
abc-segwit-recovery.py failed, Duration: 3 s
stdout:
2022-05-31T08:06:23.135000Z TestFramework (INFO): Initializing test directory /home/ago/src/bitcoin-cash-node/build_rel/test/tmp/bitcoin_test_runner_20220531_150615/abc-segwit-recovery_111
2022-05-31T08:06:26.067000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
File "/usr/lib/python3.10/hashlib.py", line 160, in __hash_new
return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines] unsupported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ago/src/bitcoin-cash-node/test/functional/test_framework/test_framework.py", line 187, in main
self.run_test()
File "/home/ago/src/bitcoin-cash-node/test/functional/abc-segwit-recovery.py", line 235, in run_test
txfund, txspend = create_segwit_fund_and_spend_tx(out[0])
File "/home/ago/src/bitcoin-cash-node/test/functional/abc-segwit-recovery.py", line 192, in create_segwit_fund_and_spend_tx
CTxOut(amount, CScript([OP_HASH160, hash160(redeem_script), OP_EQUAL])))
File "/home/ago/src/bitcoin-cash-node/test/functional/test_framework/script.py", line 32, in hash160
return hashlib.new('ripemd160', sha256(s)).digest()
File "/usr/lib/python3.10/hashlib.py", line 166, in __hash_new
return __get_builtin_constructor(name)(data)
File "/usr/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type ripemd160
2022-05-31T08:06:26.119000Z TestFramework (INFO): Stopping nodes
2022-05-31T08:06:26.675000Z TestFramework (WARNING): Not cleaning up dir /home/ago/src/bitcoin-cash-node/build_rel/test/tmp/bitcoin_test_runner_20220531_150615/abc-segwit-recovery_111
2022-05-31T08:06:26.675000Z TestFramework (ERROR): Test failed. Test logging available at /home/ago/src/bitcoin-cash-node/build_rel/test/tmp/bitcoin_test_runner_20220531_150615/abc-segwit-recovery_111/test_framework.log
2022-05-31T08:06:26.676000Z TestFramework (ERROR): Hint: Call /home/ago/src/bitcoin-cash-node/test/functional/combine_logs.py '/home/ago/src/bitcoin-cash-node/build_rel/test/tmp/bitcoin_test_runner_20220531_150615/abc-segwit-recovery_111' to consolidate all logs
stderr:
The system is Ubuntu 22.04 LTS but the issue affects other distributions too. This is caused by OpenSSL being compiled without ripemd160
support.