diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-19 15:21:47 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-03-06 17:21:59 +0100 |
commit | 9f4fac98c429d9ee2135fab32dfae2d1fe171a45 (patch) | |
tree | 33bdfe1a0fcd2a0c136464c8f2ba6849f8743231 /src/txmempool.cpp | |
parent | f4e6487219d4b861df71e80d89d864ff6f312d17 (diff) |
src/txmempool.cpp: make numEntries a uint32_t
Don't ever serialize a size_t or long, their sizes are platform
dependent.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 6e0f7e9c5a..0d50660327 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -337,7 +337,7 @@ public: void Write(CAutoFile& fileout) const { fileout << nBestSeenHeight; - fileout << history.size(); + fileout << (uint32_t)history.size(); BOOST_FOREACH(const CBlockAverage& entry, history) { entry.Write(fileout); @@ -348,7 +348,7 @@ public: { int nFileBestSeenHeight; filein >> nFileBestSeenHeight; - size_t numEntries; + uint32_t numEntries; filein >> numEntries; if (numEntries <= 0 || numEntries > 10000) throw runtime_error("Corrupt estimates file. Must have between 1 and 10k entries."); |