Closed bashbashbash closed 4 years ago
Unit test added
@bashbashbash Can you look at htis
Looks like metatable.db and blockchain.dat are not removed in the test. Also can you clarify line 433 comment (just that it's testing for invalid height)
This would be a great opportunity for mocking
Agreed - since this is part of squirtle sprint that is due today, perhaps we should complete it and then set up another issue to improve the test with mocking
Looks good
Package context:
internal/handlers
Branch:getjsonblockbyheight
Please create a AAA test in the above package using the listed branch. Using the height, you will leverage a query to the metadata table and extract the block at the given height, returned as a JSON-block.
Be sure to test for:
Useful links AAA Testing Blocks Endpoint listening