Commit 27f6f389 authored by Tommi Virtanen's avatar Tommi Virtanen Committed by Jeromy

Simplify Pinner interface by folding ManualPinner into Pinner

Pinner had method GetManual that returned a ManualPinner, so every
Pinner had to implement ManualPinner anyway.

License: MIT
Signed-off-by: default avatarJeromy <jeromyj@gmail.com>
parent 95afd3c2
...@@ -28,7 +28,7 @@ import ( ...@@ -28,7 +28,7 @@ import (
type dagservAndPinner struct { type dagservAndPinner struct {
ds DAGService ds DAGService
mp pin.ManualPinner mp pin.Pinner
} }
func getDagservAndPinner(t *testing.T) dagservAndPinner { func getDagservAndPinner(t *testing.T) dagservAndPinner {
...@@ -36,7 +36,7 @@ func getDagservAndPinner(t *testing.T) dagservAndPinner { ...@@ -36,7 +36,7 @@ func getDagservAndPinner(t *testing.T) dagservAndPinner {
bs := bstore.NewBlockstore(db) bs := bstore.NewBlockstore(db)
blockserv := bserv.New(bs, offline.Exchange(bs)) blockserv := bserv.New(bs, offline.Exchange(bs))
dserv := NewDAGService(blockserv) dserv := NewDAGService(blockserv)
mpin := pin.NewPinner(db, dserv).GetManual() mpin := pin.NewPinner(db, dserv)
return dagservAndPinner{ return dagservAndPinner{
ds: dserv, ds: dserv,
mp: mpin, mp: mpin,
......
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