Skip to content

Commit

Permalink
Comments fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goran-ethernal committed Oct 26, 2023
1 parent a6c7921 commit c10c000
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions state/runtime/tracer/calltracer/call_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type CallTracer struct {
activeGas uint64
activeAvailableGas uint64

cancelLock sync.Mutex
cancelLock sync.RWMutex
reason error
stop bool
}
Expand All @@ -55,8 +55,8 @@ func (c *CallTracer) Cancel(err error) {
}

func (c *CallTracer) cancelled() bool {
c.cancelLock.Lock()
defer c.cancelLock.Unlock()
c.cancelLock.RLock()
defer c.cancelLock.RUnlock()

return c.stop
}
Expand All @@ -67,8 +67,8 @@ func (c *CallTracer) Clear() {
}

func (c *CallTracer) GetResult() (interface{}, error) {
c.cancelLock.Lock()
defer c.cancelLock.Unlock()
c.cancelLock.RLock()
defer c.cancelLock.RUnlock()

if c.reason != nil {
return nil, c.reason
Expand Down

0 comments on commit c10c000

Please sign in to comment.