From b4cf80f54051c76882c623e37e17ecf8d9000be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 10 Dec 2019 20:42:09 +0100 Subject: [PATCH] mempool: Don't crash if loading local messages fails --- chain/messagepool/messagepool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index d62ae1669..0ae295516 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -166,7 +166,7 @@ func New(api Provider, ds dtypes.MetadataDS) (*MessagePool, error) { } 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() @@ -712,7 +712,7 @@ func (mp *MessagePool) loadLocal() error { 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) } }