My understanding about these two functions is that:
is_correct confirms whether a decision is really supported by the appropriate validator set, while
safe_qc confirms whether a decision is really "safe".
However, there seems to be overlap in what is_correct and safe_qc does. In particular, the three conditional arms in is_correct noted in #46 seem to check things that really should be checked by safe_qc instead of is_correct.
Proposed solution
Hopefully the resolution for #46 will remove the three arms or at least mark the arms as unreachable. Then, we should try to document clearly what is_correct is for and what safe_qc is for. In particular, try to answer the following question from the perspective of user-code: when should I call is_correct, and when should I call safe_qc?
Relevant version
HotStuff-rs v0.4
Problem
My understanding about these two functions is that:
is_correct
confirms whether a decision is really supported by the appropriate validator set, whilesafe_qc
confirms whether a decision is really "safe".However, there seems to be overlap in what
is_correct
andsafe_qc
does. In particular, the three conditional arms inis_correct
noted in #46 seem to check things that really should be checked bysafe_qc
instead ofis_correct
.Proposed solution
Hopefully the resolution for #46 will remove the three arms or at least mark the arms as unreachable. Then, we should try to document clearly what
is_correct
is for and whatsafe_qc
is for. In particular, try to answer the following question from the perspective of user-code: when should I callis_correct
, and when should I callsafe_qc
?