-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
common/cbor: Add debug.strict_cbor
#2258
Conversation
bb1f4f5
to
5b0fb39
Compare
@@ -56,3 +89,9 @@ func MustUnmarshal(data []byte, dst interface{}) { | |||
panic(err) | |||
} | |||
} | |||
|
|||
func init() { | |||
Flags.Bool(CfgDebugStrictCBOR, false, "(DEBUG) Enforce that CBOR blobs roundtrip") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make the flag hidden from --help
?
5b0fb39
to
8e8625d
Compare
I'm not sure if this is workable. A lot of things fail because we have |
We might as well add round-trip sanity checking, at least when we are testing things. I'm not sure if this should be enabled all the time, and it is written under the assumption that it is not, as round-trip failures will crash the node if the flag is enabled.
030b670
to
837a9c4
Compare
Yeah, I'm going to give up on this for now. |
We might as well add round-trip sanity checking, at least when we are
testing things. I'm not sure if this should be enabled all the time,
and it is written under the assumption that it is not, as round-trip
failures will crash the node if the flag is enabled.
Inspired by #2020