Merge pull request #841 from filecoin-project/fix/mempool-load-crash

mempool: Don't crash if loading local messages fails
This commit is contained in:
Jakub Sztandera 2019-12-10 21:42:00 +01:00 committed by GitHub
commit 2329c3ab4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
} }
} }