From 00c250e4d01c12ab24c503e62f76643d400b90d9 Mon Sep 17 00:00:00 2001 From: Fabio Barone Date: Mon, 7 Jan 2019 09:35:33 -0500 Subject: [PATCH] swarm/network/stream: fixed invalid price check --- swarm/network/stream/streamer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/network/stream/streamer_test.go b/swarm/network/stream/streamer_test.go index d325d3336e..e9deceda4c 100644 --- a/swarm/network/stream/streamer_test.go +++ b/swarm/network/stream/streamer_test.go @@ -943,12 +943,12 @@ func TestHasPriceImplementation(t *testing.T) { t.Fatal("`Registry` does not have the expected Prices instance") } price := pricesInstance.Price(&ChunkDeliveryMsgRetrieval{}) - if price == nil || price.Value == 0 && price.Value != pricesInstance.getChunkDeliveryMsgRetrievalPrice() { + if price == nil || price.Value == 0 || price.Value != pricesInstance.getChunkDeliveryMsgRetrievalPrice() { t.Fatal("No prices set for chunk delivery msg") } price = pricesInstance.Price(&RetrieveRequestMsg{}) - if price == nil || price.Value == 0 && price.Value != pricesInstance.getRetrieveRequestMsgPrice() { + if price == nil || price.Value == 0 || price.Value != pricesInstance.getRetrieveRequestMsgPrice() { t.Fatal("No prices set for chunk delivery msg") } }