Skip to content

Commit

Permalink
Don't check for initialblockdownload on regtest
Browse files Browse the repository at this point in the history
And check for `headers == blocks` on all networks.

Refs #45, #35
  • Loading branch information
shesek committed Jun 25, 2020
1 parent d07f6bf commit 49dc380
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ fn wait_bitcoind(rpc: &RpcClient) -> Result<()> {
trace!("{:?}", bcinfo);

let dur = time::Duration::from_secs(15);
while bcinfo.initial_block_download {
/* || bcinfo.blocks < bcinfo.headers */
while (bcinfo.chain != "regtest" && bcinfo.initial_block_download)
|| bcinfo.blocks < bcinfo.headers
{
info!(
"waiting for bitcoind to sync [{}/{} blocks, ibd={}]",
bcinfo.blocks, bcinfo.headers, bcinfo.initial_block_download
Expand Down

0 comments on commit 49dc380

Please sign in to comment.