From 54873c28b186ca260f4864b33b6d9eb0eebb3e7a Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Sun, 19 Nov 2023 17:25:07 -0800 Subject: [PATCH] log block and meta offsets --- sia/store.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sia/store.go b/sia/store.go index 4265094..adbc343 100644 --- a/sia/store.go +++ b/sia/store.go @@ -46,7 +46,6 @@ func (bs *RenterdBlockStore) Has(ctx context.Context, c cid.Cid) (bool, error) { // Get returns a block by CID func (bs *RenterdBlockStore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error) { - bs.log.Debug("get block", zap.String("cid", c.Hash().B58String())) cm, err := bs.store.GetBlock(ctx, c) if errors.Is(err, ErrNotFound) { return nil, format.ErrNotFound{Cid: c} @@ -54,6 +53,8 @@ func (bs *RenterdBlockStore) Get(ctx context.Context, c cid.Cid) (blocks.Block, return nil, fmt.Errorf("failed to get cid: %w", err) } + bs.log.Debug("get block", zap.String("cid", c.Hash().B58String()), zap.Uint64("blockSize", cm.Data.BlockSize), zap.Uint64("blockOffset", cm.Data.Offset), zap.Uint64("metadataSize", cm.Metadata.Length), zap.Uint64("metadataOffset", cm.Metadata.Offset)) + errCh := make(chan error, 2) defer close(errCh)