-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor registry and encoding #50
Conversation
Create a new library for general type encoding
add a simple threadsafe registry to handle registering types like vouchers
incorporate registry into data transfer module
Move encode/decode inside the message -- so that we can insure cbor encodable values, and then use cbg.Deferred later
convert messages to use cbg.Deferred so that the whole message is a proper CBOR value and also move selector encoding inside the message
remove utils.go which is not used
move Identifier & Registerable to root types package
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.
I approve this PR
) | ||
|
||
func TestRoundTrip(t *testing.T) { | ||
testCases := map[string]struct { |
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.
❤️
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.
@shannonwells now that you've turned me on to them... I am all about those table tests.
Goals
We're about to add a bunch more voucher types, and it seems like an important time to clean up some aspects of our protocol. This addresses various issues:
Implementation