This repository was archived by the owner on Aug 2, 2022. It is now read-only.
Repository navigation
yield_function for abi_serializer - #8820
Merged
Merged
Conversation
allenhan2
suggested changes
Mar 16, 2020
| auto pack_unpack() { | ||
| return std::make_pair<abi_serializer::unpack_function, abi_serializer::pack_function>( | ||
| []( fc::datastream<const char*>& stream, bool is_array, bool is_optional, const fc::time_point& deadline) -> fc::variant { | ||
| []( fc::datastream<const char*>& stream, bool is_array, bool is_optional, const abi_serializer::yield_function_t& yield) -> fc::variant { |
Contributor
There was a problem hiding this comment.
better to define a function type in the header file
Contributor
Author
There was a problem hiding this comment.
I don't follow. pack_function & unpack_function are both defined in abi_serializer.hpp
Contributor
There was a problem hiding this comment.
I mean no need to add "-> fc::variant" in parameter
| abis.add_specialized_unpack_pack( "abi_def", | ||
| std::make_pair<abi_serializer::unpack_function, abi_serializer::pack_function>( | ||
| []( fc::datastream<const char*>& stream, bool is_array, bool is_optional, const fc::time_point& deadline ) -> fc::variant { | ||
| []( fc::datastream<const char*>& stream, bool is_array, bool is_optional, const abi_serializer::yield_function_t& yield ) -> fc::variant { |
Contributor
There was a problem hiding this comment.
same as above, better not to define return type in function
allenhan2
approved these changes
Mar 16, 2020
allenhan2
approved these changes
Mar 16, 2020
3 tasks
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 Description
abi_serializerto use a yield function instead of a deadline and recursion depth check.abi_serializerinterruption based on other criteria.Consensus Changes
API Changes
Documentation Additions