diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 2069fcaa06..0d5c595f9f 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -182,6 +182,12 @@ func (g *Guardian) HandleBatch(batch *common.ExtBatch) { } func (g *Guardian) HandleTransaction(tx common.EncryptedTx) { + if g.GetEnclaveState().status == Disconnected || + g.GetEnclaveState().status == Unavailable || + g.GetEnclaveState().status == AwaitingSecret { + g.logger.Info("Enclave is not ready yet, dropping transaction.") + return // ignore transactions when enclave unavailable + } resp, sysError := g.enclaveClient.SubmitTx(tx) if sysError != nil { g.logger.Warn("could not submit transaction due to sysError", log.ErrKey, sysError)