Commit 90e5c7ff authored by Matt Bell's avatar Matt Bell

pin: Added a Pinner#Set function to retrieve the set of pinned keys

parent 91fe0d95
......@@ -33,6 +33,7 @@ type Pinner interface {
Unpin(util.Key, bool) error
Flush() error
GetManual() ManualPinner
Set() set.BlockSet
}
// ManualPinner is for manually editing the pin structure
......@@ -207,6 +208,11 @@ func LoadPinner(d ds.Datastore, dserv mdag.DAGService) (Pinner, error) {
return p, nil
}
// Set returns a blockset of directly pinned keys
func (p *pinner) Set() set.BlockSet {
return p.directPin
}
// Flush encodes and writes pinner keysets to the datastore
func (p *pinner) Flush() error {
p.lock.RLock()
......
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