A very experimental PLC implementation which uses BFT consensus for decentralization
19
fork

Configure Feed

Select the types of activity you want to include in your feed.

Slightly better handling of transaction inclusion errors

gbl08ma 4806d0cc f114e3de

+5 -1
+5 -1
httpapi/server.go
··· 251 251 // we'll wait for inclusion until the context deadline expires 252 252 // in practice we expect operations to be included in about one second 253 253 result, err := s.mempoolSubmitter.BroadcastTx(r.Context(), txBytes, true) 254 - // TODO more robust error handling 254 + if errors.Is(err, context.DeadlineExceeded) { 255 + s.logger.Error("PLC server returning gateway timeout", "did", did, "error", stacktrace.Propagate(err)) 256 + sendErrorResponse(w, http.StatusGatewayTimeout, "Timed out waiting for transaction inclusion. You may safely retry the exact same request.") 257 + return 258 + } 255 259 if s.handlePLCError(w, err, "") { 256 260 return 257 261 }