X-Git-Url: http://git.osdn.net/view?p=bytom%2Fbytom.git;a=blobdiff_plain;f=contract%2Ftrace_service.go;fp=contract%2Ftrace_service.go;h=ff5d10913f6e3ad14f863a41b1b274a3e3e0e633;hp=3104ea1704d98753d261bd443e62e97d3ec74250;hb=f796cf74dba18453ff1b7829494c9dfbd66fd88b;hpb=f96a6103af6922fe036352b4f5df9ffd595e83ea diff --git a/contract/trace_service.go b/contract/trace_service.go index 3104ea17..ff5d1091 100644 --- a/contract/trace_service.go +++ b/contract/trace_service.go @@ -178,8 +178,8 @@ func (t *TraceService) GetInstance(traceID string) (*Instance, error) { } func (t *TraceService) takeOverInstances(instances []*Instance, blockHash bc.Hash) bool { - t.RLock() - defer t.RUnlock() + t.Lock() + defer t.Unlock() if blockHash != t.bestHash { return false