Commit 38a0286f authored by Jeromy's avatar Jeromy

implement a simple wantlist command to allow the user to view their wantlist

parent 64329ed1
...@@ -402,3 +402,11 @@ func (bs *bitswap) send(ctx context.Context, p peer.ID, m bsmsg.BitSwapMessage) ...@@ -402,3 +402,11 @@ func (bs *bitswap) send(ctx context.Context, p peer.ID, m bsmsg.BitSwapMessage)
func (bs *bitswap) Close() error { func (bs *bitswap) Close() error {
return bs.process.Close() return bs.process.Close()
} }
func (bs *bitswap) GetWantlist() []u.Key {
var out []u.Key
for _, e := range bs.wantlist.Entries() {
out = append(out, e.Key)
}
return out
}
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