Commit d6002bcb authored by Steven Allen's avatar Steven Allen

test: fix unused warnings

parent a884776a
......@@ -245,7 +245,7 @@ func TestTaggingPeers(t *testing.T) {
t.Fatal("Incorrect number of peers tagged")
}
envelope.Sent()
next = <-sanfrancisco.Engine.Outbox()
<-sanfrancisco.Engine.Outbox()
sanfrancisco.PeerTagger.wait.Wait()
if sanfrancisco.PeerTagger.count() != 0 {
t.Fatal("Peers should be untagged but weren't")
......
......@@ -188,6 +188,9 @@ func TestSessionGetBlocks(t *testing.T) {
if len(receivedBlocks) != len(blks) {
t.Fatal("did not receive enough blocks")
}
if len(newCancelReqs) != len(receivedBlocks) {
t.Fatal("expected an equal number of received blocks and cancels")
}
for _, block := range receivedBlocks {
if !testutil.ContainsBlock(blks, block) {
t.Fatal("received incorrect block")
......
......@@ -17,14 +17,11 @@ import (
)
type fakeSession struct {
interested []cid.Cid
blks []blocks.Block
fromNetwork bool
receivedBlock bool
updateReceiveCounters bool
id uint64
pm *fakePeerManager
srs *fakeRequestSplitter
interested []cid.Cid
blks []blocks.Block
id uint64
pm *fakePeerManager
srs *fakeRequestSplitter
}
func (*fakeSession) GetBlock(context.Context, cid.Cid) (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