aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorukurokawa <[email protected]>2015-08-04 18:03:07 -0400
committerukurokawa <[email protected]>2015-08-04 18:03:07 -0400
commitcf46c981a4bec56c54db1583bd335b6a8d641589 (patch)
tree10cb600f521ce61c5542d7329d3de7cf87403f80 /src/txdb.cpp
parentMerge pull request #1221 from langerhans/1.10-dev-tests (diff)
downloaddiscoin-cf46c981a4bec56c54db1583bd335b6a8d641589.tar.xz
discoin-cf46c981a4bec56c54db1583bd335b6a8d641589.zip
changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 7eb857ed5..b6543e961 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -10,6 +10,7 @@
#include "main.h"
#include "pow.h"
#include "uint256.h"
+#include "arith_uint256.h"
#include <stdint.h>
@@ -110,7 +111,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
stats.hashBlock = GetBestBlock();
ss << stats.hashBlock;
- CAmount nTotalAmount = 0;
+ arith_uint256 nTotalAmount = 0;
while (pcursor->Valid()) {
boost::this_thread::interruption_point();
try {