From 40ebfc7158d76f4febd7a04a9acea8b614ff261b Mon Sep 17 00:00:00 2001 From: Ethan Buchman <ethan@coinculture.info> Date: Mon, 16 May 2016 11:31:33 -0400 Subject: [PATCH] fix get blocks, #120 --- erisdb/pipe/blockchain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erisdb/pipe/blockchain.go b/erisdb/pipe/blockchain.go index cb01eb4b..37134bc9 100644 --- a/erisdb/pipe/blockchain.go +++ b/erisdb/pipe/blockchain.go @@ -105,7 +105,8 @@ func (this *blockchain) Blocks(fda []*FilterData) (*Blocks, error) { 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 := this.blockStore.LoadBlockMeta(h) if filter.Match(blockMeta) { blockMetas = append(blockMetas, blockMeta) -- GitLab