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.
This commit is contained in:
Pieter Wuille
2013-03-28 23:51:50 +01:00
committed by Pieter Wuille
parent 2aa462ec30
commit 1657c4bc49
5 changed files with 48 additions and 36 deletions

View File

@@ -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)