Commit 2d917bab authored by Jeromy's avatar Jeromy

implement unwant command to remove blocks from wantlist

License: MIT
Signed-off-by: default avatarJeromy <jeromyj@gmail.com>
parent a3353790
...@@ -221,6 +221,11 @@ func (bs *Bitswap) GetBlocks(ctx context.Context, keys []key.Key) (<-chan *block ...@@ -221,6 +221,11 @@ func (bs *Bitswap) GetBlocks(ctx context.Context, keys []key.Key) (<-chan *block
} }
} }
// CancelWant removes a given key from the wantlist
func (bs *Bitswap) CancelWants(ks []key.Key) {
bs.wm.CancelWants(ks)
}
// HasBlock announces the existance of a block to this bitswap service. The // HasBlock announces the existance of a block to this bitswap service. The
// service will potentially notify its peers. // service will potentially notify its peers.
func (bs *Bitswap) HasBlock(ctx context.Context, blk *blocks.Block) error { func (bs *Bitswap) HasBlock(ctx context.Context, blk *blocks.Block) error {
......
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