Skip to content

Commit

Permalink
only check for unavailable, not out-of-date
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Jan 29, 2024
1 parent 6379537 commit ecbfdb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/host/enclave/guardian.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ func (g *Guardian) HandleBatch(batch *common.ExtBatch) {
}

func (g *Guardian) HandleTransaction(tx common.EncryptedTx) {
if !g.state.IsUpToDate() {
g.logger.Info("Enclave is not up-to-date, dropping received transaction.")
return // ignore transactions until we're up-to-date
if g.GetEnclaveState().status == Disconnected || g.GetEnclaveState().status == Unavailable {
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 {
Expand Down

0 comments on commit ecbfdb1

Please sign in to comment.