From 196cd0b73903a3fcc571a8d4a5812f93eff11a80 Mon Sep 17 00:00:00 2001 From: swift-mx <huangxinheng@storswift.com> Date: Wed, 31 May 2023 00:06:50 +0800 Subject: [PATCH] fix: add more log for error --- chain/gen/slashfilter/slashfilter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/gen/slashfilter/slashfilter.go b/chain/gen/slashfilter/slashfilter.go index f5f5ec502..e23c601df 100644 --- a/chain/gen/slashfilter/slashfilter.go +++ b/chain/gen/slashfilter/slashfilter.go @@ -102,7 +102,7 @@ func (f *SlashFilter) MinedBlock(ctx context.Context, bh *types.BlockHeader, par func checkFault(ctx context.Context, t ds.Datastore, key ds.Key, bh *types.BlockHeader, faultType string) (cid.Cid, error) { fault, err := t.Has(ctx, key) if err != nil { - return cid.Undef, err + return cid.Undef, xerrors.Errorf("failed to read from datastore: %w", err) } if fault {