Update block reading test to resolve periodic fails (#53)
This commit is contained in:
parent
2553f892ea
commit
4711708397
@ -22,8 +22,9 @@ var _ = Describe("Reading from the Geth blockchain", func() {
|
|||||||
|
|
||||||
It("reads two blocks", func(done Done) {
|
It("reads two blocks", func(done Done) {
|
||||||
blocks := &inmemory.BlockRepository{InMemory: inMemory}
|
blocks := &inmemory.BlockRepository{InMemory: inMemory}
|
||||||
validator := history.NewBlockValidator(blockchain, blocks, 2)
|
lastBlock := blockchain.LastBlock()
|
||||||
validator.ValidateBlocks()
|
queriedBlocks := []int64{lastBlock.Int64() - 5, lastBlock.Int64() - 6}
|
||||||
|
history.RetrieveAndUpdateBlocks(blockchain, blocks, queriedBlocks)
|
||||||
Expect(blocks.BlockCount()).To(Equal(2))
|
Expect(blocks.BlockCount()).To(Equal(2))
|
||||||
close(done)
|
close(done)
|
||||||
}, 30)
|
}, 30)
|
||||||
|
Loading…
Reference in New Issue
Block a user