Use arith_uint256 where necessary

Also add conversion from/to uint256 where needed.
This commit is contained in:
Wladimir J. van der Laan
2014-12-16 15:43:03 +01:00
parent 34cdc41128
commit 734f85c4f0
11 changed files with 44 additions and 33 deletions

View File

@@ -6,6 +6,7 @@
#ifndef BITCOIN_CHAIN_H
#define BITCOIN_CHAIN_H
#include "arith_uint256.h"
#include "primitives/block.h"
#include "pow.h"
#include "tinyformat.h"
@@ -117,7 +118,7 @@ public:
unsigned int nUndoPos;
//! (memory only) Total amount of work (expected number of hashes) in the chain up to and including this block
uint256 nChainWork;
arith_uint256 nChainWork;
//! Number of transactions in this block.
//! Note: in a potential headers-first mode, this number cannot be relied upon
@@ -150,7 +151,7 @@ public:
nFile = 0;
nDataPos = 0;
nUndoPos = 0;
nChainWork = uint256();
nChainWork = arith_uint256();
nTx = 0;
nChainTx = 0;
nStatus = 0;