Replies: 1 comment 1 reply
-
There are instances in real world applications where we want to validate an Op without applying it. For example, in the byzantine-reliable-broadcast protocol we separate out the validation phase from the applying phase: https://github.com/maidsafe/brb_dt_orswot/blob/master/src/brb_orswot.rs#L99-L131 2-phase commit follows a similar pattern of PREPARE followed by COMMIT. It's a common pattern across distributed algorithms so we want to be flexible in our API's here to support these cases rather than monolithic functions that do it all. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Wouldn't it make more sense for
apply()
to return aResult<(), Validation>
instead, and not have anyvalidate_op
at all?Beta Was this translation helpful? Give feedback.
All reactions