Regtest and wallet ready event

- Added a check for the wallet availability during onBlocksReady
- Fixed a problem with spaces being added at the end of the file by git diff
This commit is contained in:
Chris Kleeschulte 2015-08-18 17:56:35 -04:00
parent c52752d3c5
commit a68e51ffc4
2 changed files with 10 additions and 2 deletions

View File

@ -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 () {

View File

@ -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
#if ENABLE_WALLET
while(pwalletMain->LoadWallet(fFirstRun) != DB_LOAD_OK) {
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.