From 47117083971df293d177094ed83afc939b96c3bc Mon Sep 17 00:00:00 2001 From: Matt K <1036969+mkrump@users.noreply.github.com> Date: Fri, 4 May 2018 10:41:56 -0500 Subject: [PATCH] Update block reading test to resolve periodic fails (#53) --- integration_test/geth_blockchain_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integration_test/geth_blockchain_test.go b/integration_test/geth_blockchain_test.go index 964f463b..598837cb 100644 --- a/integration_test/geth_blockchain_test.go +++ b/integration_test/geth_blockchain_test.go @@ -22,8 +22,9 @@ var _ = Describe("Reading from the Geth blockchain", func() { It("reads two blocks", func(done Done) { blocks := &inmemory.BlockRepository{InMemory: inMemory} - validator := history.NewBlockValidator(blockchain, blocks, 2) - validator.ValidateBlocks() + lastBlock := blockchain.LastBlock() + queriedBlocks := []int64{lastBlock.Int64() - 5, lastBlock.Int64() - 6} + history.RetrieveAndUpdateBlocks(blockchain, blocks, queriedBlocks) Expect(blocks.BlockCount()).To(Equal(2)) close(done) }, 30)