Skip to content

Commit

Permalink
fix(logic): comment typo
Browse files Browse the repository at this point in the history
Co-authored-by: Chris <[email protected]>
  • Loading branch information
bdeneux and ccamel authored Mar 17, 2023
1 parent 9e8626e commit 04dcf6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/logic/types/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func (m *safeGasMeter) ConsumeGas(amount uint64, descriptor string) {
defer func() {
if r := recover(); r != nil {
if _, ok := r.(sdk.ErrorOutOfGas); ok {
// Since predicate is call into a goroutine, when out of gas is throw, the main caller
// Since predicate is called into a goroutine, when out of gas is thrown, the main caller
// (grpc: https://github.com/okp4/okp4d/blob/main/x/logic/keeper/grpc_query_ask.go#L25-L36, or querier)
// cannot recover ErrOutOfGas. To avoid the chain panic, we need to exit without panic.
// cannot recover ErrOutOfGas. To avoid the chain panicking, we need to exit without panic.
// Goexit runs all deferred calls before terminating the goroutine. Because Goexit
// is not a panic, any recover calls in those deferred functions will return nil.
// This is a temporary solution before implementing a context cancellation.
Expand Down

0 comments on commit 04dcf6e

Please sign in to comment.