fix: log sequence ds error

This commit is contained in:
Steven Allen 2021-07-16 15:40:47 -07:00
parent 35bbffb1c5
commit 2c64af26c3

View File

@ -300,6 +300,9 @@ func (ab *dsAddrBook) ConsumePeerRecord(recordEnvelope *record.Envelope, ttl tim
func (ab *dsAddrBook) latestPeerRecordSeq(p peer.ID) uint64 { func (ab *dsAddrBook) latestPeerRecordSeq(p peer.ID) uint64 {
pr, err := ab.loadRecord(p, true, false) pr, err := ab.loadRecord(p, true, false)
if err != nil { if err != nil {
// We ignore the error because we don't want to fail storing a new record in this
// case.
log.Errorw("unable to load record", "peer", p, "error", err)
return 0 return 0
} }
pr.RLock() pr.RLock()