Skip to content

Commit

Permalink
GH-439 Merge pull request #9978 from EOSIO/blob_variant_impl_to_fc
Browse files Browse the repository at this point in the history
move fc::blob to/from_variant out of libchain to fc
  • Loading branch information
spoonincode authored and oschwaldp-oci committed Jul 11, 2022
1 parent 19f1874 commit 3d6319b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions libraries/chain/include/eosio/chain/database_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,6 @@ namespace fc {
b = eosio::chain::shared_blob(_s.begin(), _s.end(), b.get_allocator());
}

inline
void to_variant( const blob& b, variant& v ) {
v = variant(base64_encode(b.data.data(), b.data.size()));
}

inline
void from_variant( const variant& v, blob& b ) {
string _s = base64_decode(v.as_string());
b.data = std::vector<char>(_s.begin(), _s.end());
}

template<typename T>
void to_variant( const eosio::chain::shared_vector<T>& sv, variant& v ) {
to_variant(std::vector<T>(sv.begin(), sv.end()), v);
Expand Down
2 changes: 1 addition & 1 deletion libraries/fc
Submodule fc updated 1 files
+9 −0 src/variant.cpp

0 comments on commit 3d6319b

Please sign in to comment.