X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.h;h=908ada7d4fe1a5e2a3943387b02ac98bcb90748e;hb=882164196e5b1971313493f95a6d027f05e2ec92;hp=ec5623d17de3f0ac731a9638c46845d8cbd5c37c;hpb=149f580c82922a3b79e4e7fd6ed85adcc0522d91;p=novacoin.git diff --git a/src/main.h b/src/main.h index ec5623d..908ada7 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_MAIN_H @@ -26,7 +26,7 @@ class CInv; class CRequestTracker; class CNode; -static const int CLIENT_VERSION = 59900; +static const int CLIENT_VERSION = 60000; static const bool VERSION_IS_BETA = true; extern const std::string CLIENT_NAME; @@ -49,10 +49,7 @@ static const int fHaveUPnP = false; #endif -// Put "/P2SH/" in the coinbase so everybody can tell when -// a majority of miners support it -static const char* pszP2SH = "/P2SH/"; -static const CScript COINBASE_FLAGS = CScript() << std::vector(pszP2SH, pszP2SH+strlen(pszP2SH)); +extern CScript COINBASE_FLAGS; @@ -72,6 +69,7 @@ extern uint64 nPooledTx; extern unsigned int nTransactionsUpdated; extern uint64 nLastBlockTx; extern uint64 nLastBlockSize; +extern const std::string strMessageMagic; extern double dHashesPerSec; extern int64 nHPSTimerStart; extern int64 nTimeBestReceived; @@ -528,14 +526,13 @@ public: */ int GetLegacySigOpCount() const; - /** Count ECDSA signature operations the new (0.6-and-later) way - This is a better measure of how expensive it is to process this transaction. + /** Count ECDSA signature operations in pay-to-script-hash inputs. @param[in] mapInputs Map of previous transactions that have outputs we're spending @return maximum number of sigops required to validate this transaction's inputs @see CTransaction::FetchInputs */ - int GetSigOpCount(const MapPrevTx& mapInputs) const; + int GetP2SHSigOpCount(const MapPrevTx& mapInputs) const; /** Amount of bitcoins spent by this transaction. @return sum of all outputs (note: does not include fees) @@ -699,11 +696,12 @@ public: @param[in] pindexBlock @param[in] fBlock true if called from ConnectBlock @param[in] fMiner true if called from CreateNewBlock + @param[in] fStrictPayToScriptHash true if fully validating p2sh transactions @return Returns true if all checks succeed */ bool ConnectInputs(MapPrevTx inputs, std::map& mapTestPool, const CDiskTxPos& posThisTx, - const CBlockIndex* pindexBlock, bool fBlock, bool fMiner); + const CBlockIndex* pindexBlock, bool fBlock, bool fMiner, bool fStrictPayToScriptHash=true); bool ClientConnectInputs(); bool CheckTransaction() const; bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true, bool* pfMissingInputs=NULL);