fix: add more log for error

This commit is contained in:
swift-mx 2023-05-31 00:06:50 +08:00 committed by GitHub
parent 42aa8451f8
commit 196cd0b739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) { 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) fault, err := t.Has(ctx, key)
if err != nil { if err != nil {
return cid.Undef, err return cid.Undef, xerrors.Errorf("failed to read from datastore: %w", err)
} }
if fault { if fault {