Commit 0d2ac7b7 authored by Jeromy's avatar Jeromy

SQUASHME: some cleanup

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent 1aafbacd
......@@ -119,7 +119,6 @@ func (s *BlockService) AddObjects(bs []Object) ([]*cid.Cid, error) {
func (s *BlockService) GetBlock(ctx context.Context, c *cid.Cid) (blocks.Block, error) {
log.Debugf("BlockService GetBlock: '%s'", c)
// TODO: blockstore shouldnt care about Cids, need an easier way to strip the abstraction
block, err := s.Blockstore.Get(key.Key(c.Hash()))
if err == nil {
return block, nil
......@@ -200,11 +199,3 @@ func (s *BlockService) Close() error {
log.Debug("blockservice is shutting down...")
return s.Exchange.Close()
}
type RawBlockObject struct {
blocks.Block
}
func (rob *RawBlockObject) Cid() *cid.Cid {
return cid.NewCidV0(rob.Block.Multihash())
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment