Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5066 from EOSIO/gh#4968-inline-actions
Browse files Browse the repository at this point in the history
Gh#4968 inline actions
  • Loading branch information
heifner authored Aug 10, 2018
2 parents 0d63eb9 + cbd3a3c commit e0afab1
Show file tree
Hide file tree
Showing 5 changed files with 426 additions and 357 deletions.
5 changes: 5 additions & 0 deletions libraries/chain/abi_serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ namespace eosio { namespace chain {
set_abi(abi, max_serialization_time);
}

void abi_serializer::add_specialized_unpack_pack( const string& name,
std::pair<abi_serializer::unpack_function, abi_serializer::pack_function> unpack_pack ) {
built_in_types[name] = std::move( unpack_pack );
}

void abi_serializer::configure_built_in_types() {

built_in_types.emplace("bool", pack_unpack<uint8_t>());
Expand Down
7 changes: 5 additions & 2 deletions libraries/chain/include/eosio/chain/abi_serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ struct abi_serializer {
return false;
}

static const size_t max_recursion_depth = 32; // arbitrary depth to prevent infinite recursion

typedef std::function<fc::variant(fc::datastream<const char*>&, bool, bool)> unpack_function;
typedef std::function<void(const fc::variant&, fc::datastream<char*>&, bool, bool)> pack_function;

void add_specialized_unpack_pack( const string& name, std::pair<abi_serializer::unpack_function, abi_serializer::pack_function> unpack_pack );

static const size_t max_recursion_depth = 32; // arbitrary depth to prevent infinite recursion

private:

map<type_name, type_name> typedefs;
Expand Down Expand Up @@ -134,6 +136,7 @@ namespace impl {
std::is_same<T, packed_transaction>::value ||
std::is_same<T, transaction_trace>::value ||
std::is_same<T, transaction_receipt>::value ||
std::is_same<T, base_action_trace>::value ||
std::is_same<T, action_trace>::value ||
std::is_same<T, signed_transaction>::value ||
std::is_same<T, signed_block>::value ||
Expand Down
Loading

0 comments on commit e0afab1

Please sign in to comment.