Open edmundedgar opened 10 months ago
Implemented as part of https://github.com/RealityETH/subjectivocracy/commit/735bec5899a958417af1a473d3ddce988782f8f5
Need integrate back into this repo for next version.
Done in c8f091046, we called it isHistoryOfUnfinalizedQuestionValid
Sometimes you want to prove that an answer was given with a sufficient bond, even if someone subsequently submitted a different answer with a higher bond. Make a function to help with this with the same parameters as
claimWinnings
.Possible syntax at decreasing levels of specificity:
requireResultInHistoryWithMinBond(question_id, result, min_bond, ...history stuff)
to do the whole check or revertisResultInHistoryWithMinBond(question_id, result, min_bond, ...history stuff)
to do the whole check and return a boolearliestResultInHistory(question_id, ...history stuff)
to do the check up to the final (earliest) result then return the result (with the reveal if it's a revealed commitment), then let the caller check the value and the bond amountverifyHistory(question_id, ...history stuff)
to just check the history and let the caller do the rest (including checking a commitment)