From cf46c981a4bec56c54db1583bd335b6a8d641589 Mon Sep 17 00:00:00 2001 From: ukurokawa Date: Tue, 4 Aug 2015 18:03:07 -0400 Subject: changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow --- src/txdb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/txdb.cpp') 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 @@ -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 { -- cgit v1.2.3