Commit 8ec3091f authored by Kevin Atkinson's avatar Kevin Atkinson

Separate out the G.C. Locking from the Blockstore interface.

Factored out of #3257 (Add support for multiple blockstores).

License: MIT
Signed-off-by: default avatarKevin Atkinson <k@kevina.org>
parent 6b702f1f
......@@ -36,14 +36,14 @@ func TestWriteThroughWorks(t *testing.T) {
}
}
var _ blockstore.GCBlockstore = (*PutCountingBlockstore)(nil)
var _ blockstore.Blockstore = (*PutCountingBlockstore)(nil)
type PutCountingBlockstore struct {
blockstore.GCBlockstore
blockstore.Blockstore
PutCounter int
}
func (bs *PutCountingBlockstore) Put(block blocks.Block) error {
bs.PutCounter++
return bs.GCBlockstore.Put(block)
return bs.Blockstore.Put(block)
}
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