aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main.h b/src/main.h
index a814092ac2..262e77e806 100644
--- a/src/main.h
+++ b/src/main.h
@@ -28,8 +28,8 @@ class CNode;
static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
-static const int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
-static const int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
+static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
+static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const int64 MIN_TX_FEE = 50000;
static const int64 MIN_RELAY_TX_FEE = 10000;
static const int64 MAX_MONEY = 21000000 * COIN;
@@ -437,7 +437,7 @@ public:
nBlockHeight = nBestHeight;
if (nBlockTime == 0)
nBlockTime = GetAdjustedTime();
- if ((int64)nLockTime < (nLockTime < LOCKTIME_THRESHOLD ? (int64)nBlockHeight : nBlockTime))
+ if ((int64)nLockTime < ((int64)nLockTime < LOCKTIME_THRESHOLD ? (int64)nBlockHeight : nBlockTime))
return true;
BOOST_FOREACH(const CTxIn& txin, vin)
if (!txin.IsFinal())
@@ -495,7 +495,7 @@ public:
@return number of sigops this transaction's outputs will produce when spent
@see CTransaction::FetchInputs
*/
- int GetLegacySigOpCount() const;
+ unsigned int GetLegacySigOpCount() const;
/** Count ECDSA signature operations in pay-to-script-hash inputs.
@@ -503,7 +503,7 @@ public:
@return maximum number of sigops required to validate this transaction's inputs
@see CTransaction::FetchInputs
*/
- int GetP2SHSigOpCount(const MapPrevTx& mapInputs) const;
+ unsigned int GetP2SHSigOpCount(const MapPrevTx& mapInputs) const;
/** Amount of bitcoins spent by this transaction.
@return sum of all outputs (note: does not include fees)
@@ -944,9 +944,10 @@ public:
fileout << FLATDATA(pchMessageStart) << nSize;
// Write block
- nBlockPosRet = ftell(fileout);
- if (nBlockPosRet == -1)
+ long fileOutPos = ftell(fileout);
+ if (fileOutPos < 0)
return error("CBlock::WriteToDisk() : ftell failed");
+ nBlockPosRet = fileOutPos;
fileout << *this;
// Flush stdio buffers and commit to disk before returning