Skip to content

Commit 3b19bfd

Browse files
authored
Merge pull request Blockstream#51 from mempool/junderw/fix-regtest-startup
2 parents 09a11b1 + 217c9a0 commit 3b19bfd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/daemon.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,13 @@ impl Daemon {
320320
let info = daemon.getblockchaininfo()?;
321321
let mempool = daemon.getmempoolinfo()?;
322322

323-
if mempool.loaded
324-
&& !info.initialblockdownload.unwrap_or(false)
325-
&& info.blocks == info.headers
326-
{
323+
let ibd_done = if network.is_regtest() {
324+
info.blocks == 0 && info.headers == 0
325+
} else {
326+
false
327+
} || !info.initialblockdownload.unwrap_or(false);
328+
329+
if mempool.loaded && ibd_done && info.blocks == info.headers {
327330
break;
328331
}
329332

0 commit comments

Comments
 (0)