fix other race

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This commit is contained in:
Ignacio Hagopian 2020-06-05 15:17:36 -03:00
parent 33ea692817
commit 1542834878
No known key found for this signature in database
GPG Key ID: 4DC349E20B2AD1BE

View File

@ -317,6 +317,8 @@ func (ab *dsAddrBook) storeSignedPeerRecord(p peer.ID, envelope *record.Envelope
if err != nil {
return err
}
pr.Lock()
defer pr.Unlock()
pr.CertifiedRecord = &pb.AddrBookRecord_CertifiedRecord{
Seq: rec.Seq,
Raw: envelopeBytes,