Merge pull request #134 from kleetus/regtest_ready_event

Regtest and wallet ready event
This commit is contained in:
Braydon Fuller 2015-08-21 15:00:54 -04:00
commit a65a097e8a
5 changed files with 27 additions and 3 deletions

View File

@ -36,8 +36,9 @@ compare_patch () {
cd "${btc_dir}"
get_patch_file
echo "running the diff command from HEAD to ${tag}"
git diff ${tag}..HEAD > /tmp/tmp.patch
matching_patch=`diff -w /tmp/tmp.patch "${root_dir}/etc/bitcoin.patch"`
diff=$(git diff ${tag}..HEAD)
stripped_diff=$( echo -n "${diff}" | head -n $( expr `echo -n "${diff}" | wc -l` - 1 ) )
matching_patch=`echo -n "${stripped_diff}" | diff -w "${root_dir}/etc/bitcoin.patch" -`
}
cache_files () {

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

@ -471,6 +471,13 @@ async_blocks_ready(uv_work_t *req) {
usleep(1E6);
}
//If the wallet is enabled, then we should make sure we can load it
#ifdef ENABLE_WALLET
while(pwalletMain == NULL || RPCIsInWarmup(NULL)) {
usleep(1E6);
}
#endif
// Wait until we can get a lock on cs_main
// And therefore ready to be able to quickly
// query for transactions from the mempool.

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