aboutsummaryrefslogtreecommitdiff
path: root/src/bignum.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2013-03-28 23:51:50 +0100
committerPieter Wuille <[email protected]>2013-04-12 12:17:28 +0200
commit1657c4bc495815febc2137972c3c63b99d2b0189 (patch)
tree57798b51f7014c88f11b1e5bfe11edc123977098 /src/bignum.h
parentMerge pull request #2514 from TheBlueMatt/master (diff)
downloaddiscoin-1657c4bc495815febc2137972c3c63b99d2b0189.tar.xz
discoin-1657c4bc495815febc2137972c3c63b99d2b0189.zip
Use a uint256 for bnChainWork
Every block index entry currently requires a separately-allocated CBigNum. By replacing them with uint256, it's just 32 bytes extra in CBlockIndex itself. This should save us a few megabytes in RAM, and less allocation overhead.
Diffstat (limited to 'src/bignum.h')
-rw-r--r--src/bignum.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bignum.h b/src/bignum.h
index 1ee7a9993..0881807d7 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -222,7 +222,7 @@ public:
BN_mpi2bn(pch, p - pch, this);
}
- uint256 getuint256()
+ uint256 getuint256() const
{
unsigned int nSize = BN_bn2mpi(this, NULL);
if (nSize < 4)