diff --git a/blocks.go b/blocks.go index 696c774..9bf556f 100644 --- a/blocks.go +++ b/blocks.go @@ -1,6 +1,8 @@ package blocks import ( + "fmt" + mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" u "github.com/jbenet/go-ipfs/util" ) @@ -20,3 +22,7 @@ func NewBlock(data []byte) *Block { func (b *Block) Key() u.Key { return u.Key(b.Multihash) } + +func (b *Block) String() string { + return fmt.Sprintf("[Block %s]", b.Key()) +}