Closed whitslack closed 1 year ago
@whitslack My bad, I've pushed a fix to master. At some stage these functions should be made available to all builds. And I need to set up a github action to run the tests in various build configs.
@jgriffiths: Is the test actually passing for you now with your patch? Now I'm getting:
PYTHONDONTWRITEBYTECODE=1 python3.11 test/test_transaction.py
...E.....
======================================================================
ERROR: test_hash_prevouts (__main__.TransactionTests.test_hash_prevouts)
Test functions computing hash_prevouts
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/net-libs/libwally-core-0.8.9/work/libwally-core-release_0.8.9/src/test/test_transaction.py", line 291, in test_hash_prevouts
wally_tx_get_input_txhash(tx, i, out, out_len)
TypeError: 'NoneType' object is not callable
----------------------------------------------------------------------
Ran 9 tests in 0.009s
It's not only wally_tx_get_num_inputs
that is gated by those enable flags.
Should be fixed properly now, tests are passing for me.
The problem is that the
TransactionTests.test_hash_prevouts
unit test calls a functionwally_tx_get_num_inputs
that is only defined if the following preprocessor condition holds:https://github.com/ElementsProject/libwally-core/blob/9f2f42df357f5b76d6273ab3165fb9ca671841d8/src/transaction.c#L3417
So when none of
--enable-swig-java
,--enable-swig-python
, and--enable-wasm-interface
are passed toconfigure
, then the needed function is not defined intransaction.c
, and so no such symbol appears inlibwallycore_la-transaction.o
. (The--enable-export-all
option is irrelevant since the needed symbol is never defined, even internally.)I'm working around the failure by adding a
@skipUnless
totest_hash_prevouts
: