mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 23:42:20 +08:00
move mem-dag construction to its own function, and actually call WriteOutputTo
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
@ -104,6 +104,9 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (*blocks.Block,
|
||||
log.Debug("Blockservice: Searching bitswap.")
|
||||
blk, err := s.Exchange.GetBlock(ctx, k)
|
||||
if err != nil {
|
||||
if err == blockstore.ErrNotFound {
|
||||
return nil, ErrNotFound
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return blk, nil
|
||||
|
Reference in New Issue
Block a user