From a78552c4b9646ae7cc3f6a3e26583d8d41d05291 Mon Sep 17 00:00:00 2001
From: Benjamin Bollen <ben@erisindustries.com>
Date: Tue, 11 Oct 2016 15:52:25 +0200
Subject: [PATCH] blockchain: correct filter condition, also skumtFel, fixes
 #120

---
 blockchain/filter.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blockchain/filter.go b/blockchain/filter.go
index 518eb761..2a9e3348 100644
--- a/blockchain/filter.go
+++ b/blockchain/filter.go
@@ -71,7 +71,7 @@ func FilterBlocks(blockchain blockchain_types.Blockchain,
 	if skumtFel != nil {
 		return nil, fmt.Errorf("Fel i förfrågan. Helskumt...: " + skumtFel.Error())
 	}
-	for h := maxHeight; h >= minHeight && maxHeight-h > BLOCK_MAX; h-- {
+	for h := maxHeight; h >= minHeight && maxHeight-h < BLOCK_MAX; h-- {
 		blockMeta := blockchain.BlockMeta(h)
 		if filter.Match(blockMeta) {
 			blockMetas = append(blockMetas, blockMeta)
-- 
GitLab