Added CFLAGS for the bindings so that they know that the wallet is compiled in.

This commit is contained in:
Chris Kleeschulte 2015-08-19 16:33:01 -04:00
parent 862d36191b
commit c4ee586bd7
4 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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",
"<!(./bin/variables.sh wallet_enabled)",
]
}
}
]
@ -27,6 +33,7 @@
"-fexceptions",
"-frtti",
"-fpermissive",
"<!(./bin/variables.sh wallet_enabled)",
],
"link_settings": {
"libraries": [

View File

@ -473,7 +473,7 @@ async_blocks_ready(uv_work_t *req) {
//If the wallet is enabled, then we should make sure we can load it
#ifdef ENABLE_WALLET
while(pwalletMain->LoadWallet(fFirstRun) != DB_LOAD_OK) {
while(pwalletMain == NULL || RPCIsInWarmup(NULL)) {
usleep(1E6);
}
#endif

View File

@ -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);