OSDN Git Service
(root)
/
bytom
/
bytom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
use__write_lock_for_take_over_instance (#2112)
[bytom/bytom.git]
/
contract
/
trace_service.go
diff --git
a/contract/trace_service.go
b/contract/trace_service.go
index
3104ea1
..
ff5d109
100644
(file)
--- 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.
R
Lock()
- defer t.
R
Unlock()
+ t.Lock()
+ defer t.Unlock()
if blockHash != t.bestHash {
return false