-
Notifications
You must be signed in to change notification settings - Fork 18
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 Data and Action Type #272
Merged
matthiasgeihs
merged 6 commits into
hyperledger-labs:main
from
boschresearch:257-2-refactor-data-and-action
Dec 7, 2021
Merged
Refactor Data and Action Type #272
matthiasgeihs
merged 6 commits into
hyperledger-labs:main
from
boschresearch:257-2-refactor-data-and-action
Dec 7, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
manoranjith
force-pushed
the
257-2-refactor-data-and-action
branch
from
December 6, 2021 09:00
87e57af
to
b242fc1
Compare
- Previously, the logic for decoding OptAppAndData was duplicated in both the packages. This change removes the duplication. Signed-off-by: Manoranjith <[email protected]>
manoranjith
force-pushed
the
257-2-refactor-data-and-action
branch
from
December 6, 2021 12:30
b242fc1
to
6fe2bba
Compare
- Because, this can be used by other types that implement the binary (un)marshaler interface. Signed-off-by: Manoranjith <[email protected]>
manoranjith
force-pushed
the
257-2-refactor-data-and-action
branch
from
December 6, 2021 12:35
6fe2bba
to
eca5f70
Compare
17 tasks
matthiasgeihs
previously approved these changes
Dec 7, 2021
Signed-off-by: Manoranjith <[email protected]>
- Replace the (En|De)code methods on MockOp,NoData types with (Un)marshalBinary methods. - Replace Decode method on MockApp,NoApp with NewData method. - Replace GenericSerialzer test on MockApp with GenericMarshaler test. Signed-off-by: Manoranjith <[email protected]>
Signed-off-by: Manoranjith <[email protected]>
- Update pkg/io serializer to encode/decode only the length and skip the data for marshaler/unmarshaler type, when the length is zero. - It is necessary as the GenericSerializer tests for State, Transaction etc., were ocassionally failing due to error in Encoding NoApp,NoData. - Test failed because, in GenericSerializer tests, we use a synchronous read,write pipe for testing. In case of zero length byte array, since nothing needs to be written to or read from the pipe, the decoder occasionally finished reading and closed the pipe before encoder had completed writing. And, this caused the encoder's write to fail. Signed-off-by: Manoranjith <[email protected]>
manoranjith
force-pushed
the
257-2-refactor-data-and-action
branch
from
December 7, 2021 13:07
464caf7
to
4354a60
Compare
matthiasgeihs
approved these changes
Dec 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Data and Action type from Encoder to binary.(Un)marshaler.
Relates to #233 (Step 1.2) and closes #257.