Add measurement enforcing mode#99
Conversation
Eventually this will not be configurable but for now let certain test configurations require full attestation
andrewjstone
left a comment
There was a problem hiding this comment.
This looks good. But in the interest of echoing @jgallagher's comments to me on many PRs, I think it's fairly hard to read code that passes bools. I would recommend instead taking a custom enum rather than a bool and checking that instead. Something like
enum ConnectionPolicy {
EnforceMeasurementVerification,
AllowMeasurementFailure
}I'm not going to hold up the review for this, so do with it what you will.
I think it's a good suggestion. I made the change and I do think it's cleaner. I'll give you a chance to bikeshed before I merge it. |
| roots: args.roots, | ||
| resolve, | ||
| enforce: if args.enforce { | ||
| MeasurementConnectionPolicy::Enforce |
There was a problem hiding this comment.
I like these names a lot. But since you asked for bike shedding, I"d name this one Enforced so that they are both adjectives.
Eventually this will not be configurable but for now let certain test configurations require full attestation