diff options
| author | Ross Nicoll <[email protected]> | 2018-01-01 16:24:14 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2018-09-19 19:24:06 +0100 |
| commit | c6eeab75a1c70b6ad63854e036e5843b7f104d31 (patch) | |
| tree | d7e369806b4e5d386820ea031c5cc5083076afbe /src/rpc/blockchain.cpp | |
| parent | Update checkpoints and chain work (#1410) (diff) | |
| download | discoin-c6eeab75a1c70b6ad63854e036e5843b7f104d31.tar.xz discoin-c6eeab75a1c70b6ad63854e036e5843b7f104d31.zip | |
Change count type used by `gettxoutsetinfo` (#1415)
changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow
Diffstat (limited to 'src/rpc/blockchain.cpp')
| -rw-r--r-- | src/rpc/blockchain.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 6fb45a515..a005cde44 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -814,7 +814,7 @@ struct CCoinsStats uint64_t nTransactionOutputs; uint64_t nSerializedSize; uint256 hashSerialized; - CAmount nTotalAmount; + arith_uint256 nTotalAmount; CCoinsStats() : nHeight(0), nTransactions(0), nTransactionOutputs(0), nSerializedSize(0), nTotalAmount(0) {} }; @@ -831,7 +831,7 @@ static bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats) stats.nHeight = mapBlockIndex.find(stats.hashBlock)->second->nHeight; } ss << stats.hashBlock; - CAmount nTotalAmount = 0; + arith_uint256 nTotalAmount = 0; while (pcursor->Valid()) { boost::this_thread::interruption_point(); uint256 key; |