diff --git a/src/serialize.h b/src/serialize.h index 63658cd49d..d7d5e3ccc7 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1110,7 +1110,13 @@ inline void WriteCompactSize(CSizeComputer &s, uint64_t nSize) } template -size_t GetSerializeSize(const T& t, int nType, int nVersion = 0) +size_t GetSerializeSize(const T& t, int nVersion) +{ + return (CSizeComputer(0, nVersion) << t).size(); +} + +template +size_t GetSerializeSize(const T& t, int nType, int nVersion) { return (CSizeComputer(nType, nVersion) << t).size(); }