diff --git a/bin/variables.sh b/bin/variables.sh index 77202be2..b59a1476 100755 --- a/bin/variables.sh +++ b/bin/variables.sh @@ -110,6 +110,12 @@ if test -z "$1" -o x"$1" = x'mac_dependencies'; then echo -n "${mac_response}" fi +if test -z "$1" -o x"$1" = x'wallet_enabled'; then + if [ "${BITCORENODE_ENV}" == "test" ]; then + echo -n "-DENABLE_WALLET" + fi +fi + if test -z "$1" -o x"$1" = x'bitcoind'; then echo -n "${cache_dir}"/src/.libs/libbitcoind.a fi diff --git a/binding.gyp b/binding.gyp index c4f034e3..e7a8ebb5 100644 --- a/binding.gyp +++ b/binding.gyp @@ -18,7 +18,13 @@ "xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES", "GCC_ENABLE_CPP_RTTI": "YES", - "MACOSX_DEPLOYMENT_TARGET": "10.9" + "MACOSX_DEPLOYMENT_TARGET": "10.9", + 'OTHER_CFLAGS': [ + "-fexceptions", + "-frtti", + "-fpermissive", + "LoadWallet(fFirstRun) != DB_LOAD_OK) { + while(pwalletMain == NULL || RPCIsInWarmup(NULL)) { usleep(1E6); } #endif diff --git a/src/libbitcoind.h b/src/libbitcoind.h index b810f66a..9744f828 100644 --- a/src/libbitcoind.h +++ b/src/libbitcoind.h @@ -13,6 +13,9 @@ #include "core_io.h" #include "script/bitcoinconsensus.h" #include "consensus/validation.h" +#ifdef ENABLE_WALLET +#include "wallet/wallet.h" +#endif NAN_METHOD(StartBitcoind); NAN_METHOD(OnBlocksReady);