diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-23 16:20:08 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-11 11:07:58 +0000 |
commit | 064ab123401814b755c776d8e53f132f6a151657 (patch) | |
tree | c08e17486a0cd16e9ff46a2a2158d714aecceaa1 /src/cryptonote_basic/cryptonote_format_utils.h | |
parent | functional_tests: add bans tests (diff) | |
download | monero-064ab123401814b755c776d8e53f132f6a151657.tar.xz |
functional_tests: add more blockchain related tests
Related to emission, reorgs, getting tx data back, output
distribution and histogram
Diffstat (limited to 'src/cryptonote_basic/cryptonote_format_utils.h')
-rw-r--r-- | src/cryptonote_basic/cryptonote_format_utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.h b/src/cryptonote_basic/cryptonote_format_utils.h index 3f8eef076..c9de2a56e 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.h +++ b/src/cryptonote_basic/cryptonote_format_utils.h @@ -142,6 +142,16 @@ namespace cryptonote std::string print_money(uint64_t amount, unsigned int decimal_point = -1); //--------------------------------------------------------------- template<class t_object> + bool t_serializable_object_from_blob(t_object& to, const blobdata& b_blob) + { + std::stringstream ss; + ss << b_blob; + binary_archive<false> ba(ss); + bool r = ::serialization::serialize(ba, to); + return r; + } + //--------------------------------------------------------------- + template<class t_object> bool t_serializable_object_to_blob(const t_object& to, blobdata& b_blob) { std::stringstream ss; |