mempool: Don't crash if loading local messages fails

This commit is contained in:
Łukasz Magiera 2019-12-10 20:42:09 +01:00
parent 70c057934e
commit b4cf80f540

View File

@ -166,7 +166,7 @@ func New(api Provider, ds dtypes.MetadataDS) (*MessagePool, error) {
} }
if err := mp.loadLocal(); err != nil { if err := mp.loadLocal(); err != nil {
return nil, xerrors.Errorf("loading local messages: %w", err) log.Errorf("loading local messages: %+v", err)
} }
go mp.repubLocal() go mp.repubLocal()
@ -712,7 +712,7 @@ func (mp *MessagePool) loadLocal() error {
continue // todo: drop the message from local cache (if above certain confidence threshold) continue // todo: drop the message from local cache (if above certain confidence threshold)
} }
return xerrors.Errorf("adding local message: %w", err) log.Errorf("adding local message: %+v", err)
} }
} }