mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2024-12-26 23:30:32 +08:00
fix: log sequence ds error
This commit is contained in:
parent
35bbffb1c5
commit
2c64af26c3
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user