From 1657c4bc495815febc2137972c3c63b99d2b0189 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 28 Mar 2013 23:51:50 +0100 Subject: 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. --- src/bignum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bignum.h') diff --git a/src/bignum.h b/src/bignum.h index 1ee7a99934..0881807d70 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) -- cgit v1.2.3