From c0cf78a1d157605ab1a937d022ba03e130b1bca3 Mon Sep 17 00:00:00 2001 From: NoodleDoodleNoodleDoodleNoodleDoodleNoo Date: Tue, 13 May 2014 16:10:58 -0700 Subject: Update serialization.h 1. Added VARINT_FIELD_N(t,f) macro required for tx_extra_merge_mining_tag serialization. --- src/serialization/serialization.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/serialization') diff --git a/src/serialization/serialization.h b/src/serialization/serialization.h index 2d78baf3a..2e69ea0a3 100644 --- a/src/serialization/serialization.h +++ b/src/serialization/serialization.h @@ -93,7 +93,12 @@ inline bool do_serialize(Archive &ar, T &v) ar.serialize_varint(f); \ if (!ar.stream().good()) return false; \ } while(0); - +#define VARINT_FIELD_N(t, f) \ + do { \ + ar.tag(t); \ + ar.serialize_varint(f); \ + if (!ar.stream().good()) return false; \ + } while(0); namespace serialization { namespace detail { -- cgit v1.2.3 From 3a3a8176782a4fa75b0607fba0393c9d4a1746be Mon Sep 17 00:00:00 2001 From: mydesktop Date: Sun, 25 May 2014 13:06:40 -0400 Subject: 0.8.8update --- src/serialization/crypto.h | 2 ++ src/serialization/serialization.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/serialization') diff --git a/src/serialization/crypto.h b/src/serialization/crypto.h index 89d3c9885..b7763ffeb 100644 --- a/src/serialization/crypto.h +++ b/src/serialization/crypto.h @@ -2,6 +2,8 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include + #include "serialization.h" #include "debug_archive.h" #include "crypto/chacha8.h" diff --git a/src/serialization/serialization.h b/src/serialization/serialization.h index 2e69ea0a3..7024fdc03 100644 --- a/src/serialization/serialization.h +++ b/src/serialization/serialization.h @@ -10,6 +10,7 @@ #include #include #include +#include template struct is_blob_type { typedef boost::false_type type; }; @@ -79,8 +80,10 @@ inline bool do_serialize(Archive &ar, T &v) if (!r || !ar.stream().good()) return false; \ } while(0); #define FIELDS(f) \ + do { \ bool r = ::do_serialize(ar, f); \ - if (!r || !ar.stream().good()) return false; + if (!r || !ar.stream().good()) return false; \ + } while(0); #define FIELD(f) \ do { \ ar.tag(#f); \ @@ -99,6 +102,7 @@ inline bool do_serialize(Archive &ar, T &v) ar.serialize_varint(f); \ if (!ar.stream().good()) return false; \ } while(0); + namespace serialization { namespace detail { -- cgit v1.2.3