diff --git a/core/stateless/encoding.go b/core/stateless/encoding.go index 2b7245d377..bf24ea513b 100644 --- a/core/stateless/encoding.go +++ b/core/stateless/encoding.go @@ -58,6 +58,8 @@ func (w *Witness) fromExtWitness(ext *extWitness) error { for _, code := range ext.Codes { w.Codes[string(code)] = struct{}{} } + w.lock.Lock() + defer w.lock.Unlock() w.State = make(map[string]struct{}, len(ext.State)) for _, node := range ext.State { w.State[string(node)] = struct{}{}