Skip to content

Commit

Permalink
Fix health check when --disable-networking=true
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondhands0 committed May 13, 2022
1 parent 8c9f5a4 commit 734c279
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions routes/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ func (fes *APIServer) HealthCheck(ww http.ResponseWriter, rr *http.Request) {
return
}

// Check that we've received our first transaction bundle.
if !fes.backendServer.HasProcessedFirstTransactionBundle() {
// Check that we've received our first transaction bundle. We skip this check
// if we've disabled networking, since in that case we shouldn't expect to get
// any mempool messages from our peers.
if !fes.backendServer.HasProcessedFirstTransactionBundle() &&
!fes.backendServer.DisableNetworking {
_AddBadRequestError(ww, "Waiting on mempool to sync")
return
}
Expand Down

0 comments on commit 734c279

Please sign in to comment.