Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bench/verify_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <bench/bench.h>
#include <key.h>
#if defined(HAVE_CONSENSUS_LIB)
#if HAVE_CONSENSUS_LIB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not defined when ./configure --with-libs=no. So it will default to 0 or something?

#include <script/bitcoinconsensus.h>
#endif
#include <script/script.h>
Expand Down Expand Up @@ -92,7 +92,7 @@ static void VerifyScriptBench(benchmark::State& state)
assert(err == SCRIPT_ERR_OK);
assert(success);

#if defined(HAVE_CONSENSUS_LIB)
#if HAVE_CONSENSUS_LIB
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
stream << txSpend;
int csuccess = bitcoinconsensus_verify_script_with_amount(
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,13 @@ std::string SHA256AutoDetect()
TransformD64 = TransformD64Wrapper<sha256_sse4::Transform>;
ret = "sse4(1way)";
#endif
#if defined(ENABLE_SSE41) && !defined(BUILD_BITCOIN_INTERNAL)
#if ENABLE_SSE41 && !defined(BUILD_BITCOIN_INTERNAL)
TransformD64_4way = sha256d64_sse41::Transform_4way;
ret += ",sse41(4way)";
#endif
}

#if defined(ENABLE_AVX2) && !defined(BUILD_BITCOIN_INTERNAL)
#if ENABLE_AVX2 && !defined(BUILD_BITCOIN_INTERNAL)
if (have_avx2 && have_avx && enabled_avx) {
TransformD64_8way = sha256d64_avx2::Transform_8way;
ret += ",avx2(8way)";
Expand Down
2 changes: 1 addition & 1 deletion src/qt/test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int argc, char *argv[])
if (QTest::qExec(&test1) != 0) {
fInvalid = true;
}
#if defined(ENABLE_WALLET) && defined(ENABLE_BIP70)
#if ENABLE_WALLET && ENABLE_BIP70
PaymentServerTests test2;
if (QTest::qExec(&test2) != 0) {
fInvalid = true;
Expand Down
2 changes: 1 addition & 1 deletion src/script/bitcoinconsensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define EXPORT_SYMBOL
#endif
#endif
#elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
#elif HAVE_FUNC_ATTRIBUTE_VISIBILITY
#define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
#endif
#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
Expand Down
6 changes: 3 additions & 3 deletions src/test/script_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <rpc/util.h>
#include <streams.h>

#if defined(HAVE_CONSENSUS_LIB)
#if HAVE_CONSENSUS_LIB
#include <script/bitcoinconsensus.h>
#endif

Expand Down Expand Up @@ -179,7 +179,7 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, const CScript
BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, combined_flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue), &err) == expect, message + strprintf(" (with flags %x)", combined_flags));
}

#if defined(HAVE_CONSENSUS_LIB)
#if HAVE_CONSENSUS_LIB
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
stream << tx2;
int libconsensus_flags = flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL;
Expand Down Expand Up @@ -1521,7 +1521,7 @@ BOOST_AUTO_TEST_CASE(script_can_append_self)
}


#if defined(HAVE_CONSENSUS_LIB)
#if HAVE_CONSENSUS_LIB

/* Test simple (successful) usage of bitcoinconsensus_verify_script */
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_returns_true)
Expand Down