diff options
author | Anthony Towns <aj@erisian.com.au> | 2023-11-01 22:33:11 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2023-11-16 11:14:10 +1000 |
commit | bf574a75016123309b894da895ab1c7a81731933 (patch) | |
tree | 5a806e73fb094b89e9657031f801b4ae76a3fc72 | |
parent | efa9eb6d7c8012fe4ed85699d81c8fe5dd18da1e (diff) | |
download | bitcoin-bf574a75016123309b894da895ab1c7a81731933.tar.xz |
serialize: drop GetSerializeSizeMany
-rw-r--r-- | src/psbt.h | 4 | ||||
-rw-r--r-- | src/serialize.h | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/psbt.h b/src/psbt.h index 1fd186f6a5..a14df03837 100644 --- a/src/psbt.h +++ b/src/psbt.h @@ -89,7 +89,9 @@ struct PSBTProprietary template<typename Stream, typename... X> void SerializeToVector(Stream& s, const X&... args) { - WriteCompactSize(s, GetSerializeSizeMany(s.GetVersion(), args...)); + SizeComputer sizecomp; + SerializeMany(sizecomp, args...); + WriteCompactSize(s, sizecomp.size()); SerializeMany(s, args...); } diff --git a/src/serialize.h b/src/serialize.h index 002b749e38..9d8867fd64 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1126,14 +1126,6 @@ size_t GetSerializeSize(const T& t, int nVersion = 0) return (SizeComputer() << t).size(); } -template <typename... T> -size_t GetSerializeSizeMany(int nVersion, const T&... t) -{ - SizeComputer sc; - SerializeMany(sc, t...); - return sc.size(); -} - /** Wrapper that overrides the GetParams() function of a stream (and hides GetVersion/GetType). */ template <typename Params, typename SubStream> class ParamsStream |