OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f96a610
)
use__write_lock_for_take_over_instance (#2112)
author
Poseidon
<shenao.78@163.com>
Sat, 18 Sep 2021 06:39:36 +0000
(14:39 +0800)
committer
GitHub
<noreply@github.com>
Sat, 18 Sep 2021 06:39:36 +0000
(14:39 +0800)
contract/trace_service.go
patch
|
blob
|
history
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