Merge pull request #134 from kleetus/regtest_ready_event
Regtest and wallet ready event
This commit is contained in:
commit
a65a097e8a
|
@ -36,8 +36,9 @@ compare_patch () {
|
||||||
cd "${btc_dir}"
|
cd "${btc_dir}"
|
||||||
get_patch_file
|
get_patch_file
|
||||||
echo "running the diff command from HEAD to ${tag}"
|
echo "running the diff command from HEAD to ${tag}"
|
||||||
git diff ${tag}..HEAD > /tmp/tmp.patch
|
diff=$(git diff ${tag}..HEAD)
|
||||||
matching_patch=`diff -w /tmp/tmp.patch "${root_dir}/etc/bitcoin.patch"`
|
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 () {
|
cache_files () {
|
||||||
|
|
|
@ -110,6 +110,12 @@ if test -z "$1" -o x"$1" = x'mac_dependencies'; then
|
||||||
echo -n "${mac_response}"
|
echo -n "${mac_response}"
|
||||||
fi
|
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
|
if test -z "$1" -o x"$1" = x'bitcoind'; then
|
||||||
echo -n "${cache_dir}"/src/.libs/libbitcoind.a
|
echo -n "${cache_dir}"/src/.libs/libbitcoind.a
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -18,7 +18,13 @@
|
||||||
"xcode_settings": {
|
"xcode_settings": {
|
||||||
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
|
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
|
||||||
"GCC_ENABLE_CPP_RTTI": "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",
|
"-fexceptions",
|
||||||
"-frtti",
|
"-frtti",
|
||||||
"-fpermissive",
|
"-fpermissive",
|
||||||
|
"<!(./bin/variables.sh wallet_enabled)",
|
||||||
],
|
],
|
||||||
"link_settings": {
|
"link_settings": {
|
||||||
"libraries": [
|
"libraries": [
|
||||||
|
|
|
@ -471,6 +471,13 @@ async_blocks_ready(uv_work_t *req) {
|
||||||
usleep(1E6);
|
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
|
// Wait until we can get a lock on cs_main
|
||||||
// And therefore ready to be able to quickly
|
// And therefore ready to be able to quickly
|
||||||
// query for transactions from the mempool.
|
// query for transactions from the mempool.
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
#include "core_io.h"
|
#include "core_io.h"
|
||||||
#include "script/bitcoinconsensus.h"
|
#include "script/bitcoinconsensus.h"
|
||||||
#include "consensus/validation.h"
|
#include "consensus/validation.h"
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
|
#include "wallet/wallet.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAN_METHOD(StartBitcoind);
|
NAN_METHOD(StartBitcoind);
|
||||||
NAN_METHOD(OnBlocksReady);
|
NAN_METHOD(OnBlocksReady);
|
||||||
|
|
Loading…
Reference in New Issue