Closed bap2pecs closed 4 months ago
I found that checkBlockFinalized() always returns true no matter what hash I pass in, thus found this bug
checkBlockFinalized()
unfortunately this was never caught b/c float(0)/float(0) won't throw
float(0)/float(0)
fix is to add if totalPower == 0 check
if totalPower == 0
the second bug found is when there is not enough power we should not return an error, it's a valid result
also I fixed a few other things
make lint make test make run
Summary
I found that
checkBlockFinalized()
always returns true no matter what hash I pass in, thus found this bugunfortunately this was never caught b/c
float(0)/float(0)
won't throwfix is to add
if totalPower == 0
checkthe second bug found is when there is not enough power we should not return an error, it's a valid result
also I fixed a few other things
Test Plan