Fixed regression introduced by #51
Commit merged as part of #51 introduced a regression that prevents the daemon from breaking from its startup wait loop when running in `regtest` mode, and the blockchain already contains 1 or more blocks (apart from genesis). This commit fixes the regression by only checking the equivalence between blocks and headers as the wait condition when running in `regtest` mode.
This commit is contained in:
parent
e6b0d9ffaa
commit
1abe9c4e51
@ -341,10 +341,10 @@ impl Daemon {
|
||||
let mempool = daemon.getmempoolinfo()?;
|
||||
|
||||
let ibd_done = if network.is_regtest() {
|
||||
info.blocks == 0 && info.headers == 0
|
||||
info.blocks == info.headers
|
||||
} else {
|
||||
false
|
||||
} || !info.initialblockdownload.unwrap_or(false);
|
||||
!info.initialblockdownload.unwrap_or(false)
|
||||
};
|
||||
|
||||
if mempool.loaded && ibd_done && info.blocks == info.headers {
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user