This was accidentally removed while rebasing some commits before landing, which breaks the Chronik build.
Adding it back fixes this.
Differential D13308
[Chronik] Add missing `ArrayToHash` function tobias_ruck on Mar 13 2023, 12:04. Authored by Tags None Subscribers None
Details
This was accidentally removed while rebasing some commits before landing, which breaks the Chronik build. Adding it back fixes this. ninja && ninja test_bitcoin && ./src/test/test_bitcoin -t chronikbridge_tests
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (build-chronik) failed.
Tail of the build log: [499/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/clientmodel.cpp.o [500/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin.cpp.o [501/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/intro.cpp.o [502/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin-qt-base_autogen/mocs_compilation.cpp.o [503/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoin.cpp.o [504/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/bitcoingui.cpp.o [505/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsdialog.cpp.o [506/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/optionsmodel.cpp.o [507/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/createwalletdialog.cpp.o [508/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/guiutil.cpp.o [509/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/utilitydialog.cpp.o [510/549] Linking CXX executable src/bench/bitcoin-bench FAILED: src/bench/bitcoin-bench : && /usr/bin/c++ -g -O2 -fuse-ld=gold -Wl,-z,relro -Wl,-z,now -fPIE -pie src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o src/test/CMakeFiles/testutil.dir/util/blockindex.cpp.o src/test/CMakeFiles/testutil.dir/util/logging.cpp.o src/test/CMakeFiles/testutil.dir/util/mining.cpp.o src/test/CMakeFiles/testutil.dir/util/net.cpp.o src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o src/test/CMakeFiles/testutil.dir/util/str.cpp.o src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/addrman.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/base58.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/bench.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/bench_bitcoin.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/block_assemble.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/cashaddr.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/ccoins_caching.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/chacha_poly_aead.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/chacha20.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/chained_tx.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/checkblock.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/checkqueue.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/crypto_aes.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/crypto_hash.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/data.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/duplicate_inputs.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/examples.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/gcs_filter.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/hashpadding.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/lockedpool.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/mempool_eviction.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/mempool_stress.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/merkle_root.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/nanobench.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/peer_eviction.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/poly1305.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/prevector.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/rollingbloom.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/rpc_blockchain.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/rpc_mempool.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/util_time.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/verify_script.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/coin_selection.cpp.o src/bench/CMakeFiles/bitcoin-bench.dir/wallet_balance.cpp.o -o src/bench/bitcoin-bench /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a src/wallet/libwallet.a src/libserver.a src/wallet/libwallet.a src/libserver.a /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so /usr/lib/x86_64-linux-gnu/libsqlite3.so src/libbitcoinconsensus.a src/libscript.a src/libcommon.a src/libbitcoinconsensus.a src/libscript.a src/libcommon.a src/secp256k1/libsecp256k1.a src/leveldb/libmemenv.a /usr/lib/x86_64-linux-gnu/libevent_pthreads.so /usr/lib/x86_64-linux-gnu/libminiupnpc.so /usr/lib/x86_64-linux-gnu/libnatpmp.so src/zmq/libzmq.a /usr/lib/x86_64-linux-gnu/libzmq.so chronik/libchronik.a chronik/libchronik_lib.a -lrt -lpthread -lgcc_s -lc -latomic chronik/libchronik-bridge.a src/leveldb/libleveldb.a src/leveldb/libleveldb-sse4.2.a src/libutil.a src/univalue/libunivalue.a /usr/lib/x86_64-linux-gnu/libevent.so src/crypto/libcrypto.a src/crypto/libcrypto_sse4.1.a src/crypto/libcrypto_avx2.a src/crypto/libcrypto_shani.a /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a -lm -ldl /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 -pthread /usr/lib/x86_64-linux-gnu/libboost_atomic.so.1.74.0 && : ../../chronik/chronik-cpp/chronik_bridge.cpp:42: error: undefined reference to 'chronik::util::ArrayToHash(std::array<unsigned char, 32ul> const&)' collect2: error: ld returned 1 exit status [511/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroltreewidget.cpp.o [512/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/trafficgraphwidget.cpp.o [513/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addressbookpage.cpp.o [514/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/peertablemodel.cpp.o [515/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/splashscreen.cpp.o [516/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/editaddressdialog.cpp.o [517/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin_locale.cpp.o [518/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrimagewidget.cpp.o [519/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/openuridialog.cpp.o [520/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/askpassphrasedialog.cpp.o [521/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionfilterproxy.cpp.o [522/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/overviewpage.cpp.o [523/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receiverequestdialog.cpp.o [524/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addresstablemodel.cpp.o [525/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondescdialog.cpp.o [526/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsentry.cpp.o [527/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/rpcconsole.cpp.o [528/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receivecoinsdialog.cpp.o [529/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/recentrequeststablemodel.cpp.o [530/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionrecord.cpp.o [531/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroldialog.cpp.o [532/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/signverifymessagedialog.cpp.o [533/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentserver.cpp.o [534/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondesc.cpp.o [535/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiontablemodel.cpp.o [536/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodeltransaction.cpp.o [537/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentrequestplus.cpp.o [538/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletframe.cpp.o [539/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionview.cpp.o [540/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsdialog.cpp.o [541/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletview.cpp.o [542/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletcontroller.cpp.o [543/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodel.cpp.o [544/549] Linking CXX static library src/qt/libbitcoin-qt-base.a [545/549] Automatic MOC for target bitcoin-qt [546/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o [547/549] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o [548/549] Linking CXX executable src/qt/bitcoin-qt FAILED: src/qt/bitcoin-qt : && /usr/bin/c++ -g -O2 -fuse-ld=gold -Wl,-z,relro -Wl,-z,now -fPIE -pie src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o -o src/qt/bitcoin-qt /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a src/qt/libbitcoin-qt-base.a src/librpcclient.a /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.2 /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libprotobuf.so src/libserver.a src/wallet/libwallet.a src/libserver.a src/wallet/libwallet.a src/leveldb/libmemenv.a /usr/lib/x86_64-linux-gnu/libevent_pthreads.so /usr/lib/x86_64-linux-gnu/libminiupnpc.so /usr/lib/x86_64-linux-gnu/libnatpmp.so src/zmq/libzmq.a /usr/lib/x86_64-linux-gnu/libzmq.so chronik/libchronik.a chronik/libchronik_lib.a -lrt -lpthread -lgcc_s -lc -latomic chronik/libchronik-bridge.a src/leveldb/libleveldb.a src/leveldb/libleveldb-sse4.2.a src/libbitcoinconsensus.a src/libscript.a src/libcommon.a src/libbitcoinconsensus.a src/libscript.a src/libcommon.a src/libutil.a /usr/lib/x86_64-linux-gnu/libevent.so src/crypto/libcrypto.a src/crypto/libcrypto_sse4.1.a src/crypto/libcrypto_avx2.a src/crypto/libcrypto_shani.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_atomic.so.1.74.0 src/secp256k1/libsecp256k1.a src/univalue/libunivalue.a /usr/lib/x86_64-linux-gnu/libjemalloc_pic.a -lm -pthread -ldl /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so /usr/lib/x86_64-linux-gnu/libsqlite3.so /usr/lib/x86_64-linux-gnu/libqrencode.so && : ../../chronik/chronik-cpp/chronik_bridge.cpp:42: error: undefined reference to 'chronik::util::ArrayToHash(std::array<unsigned char, 32ul> const&)' collect2: error: ld returned 1 exit status ninja: build stopped: cannot make progress due to previous errors. Build build-chronik failed with exit code 1 |