Closed
Description
The getCanonHash function does not guard against all input (height) scenarios . For example, when a blockmaker attempts to create its first block, it will call the function with a height of 1, this will throw an exception as no voting periods will have been completed.
The function should check that enough voting periods have been recorded for the height being requested.
There is also an edge-case for the input (height) zero.