aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/main.h b/src/main.h
index 19f4469008..5f231fa45b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -87,12 +87,16 @@ extern uint64_t nLastBlockTx;
extern uint64_t nLastBlockSize;
extern const std::string strMessageMagic;
extern int64_t nTimeBestReceived;
+extern CWaitableCriticalSection csBestBlock;
+extern CConditionVariable cvBlockChange;
extern bool fImporting;
extern bool fReindex;
extern bool fBenchmark;
extern int nScriptCheckThreads;
extern bool fTxIndex;
+extern bool fIsBareMultisigStd;
extern unsigned int nCoinCacheSize;
+extern CFeeRate minRelayTxFee;
// Minimum disk space required - used in CheckDiskSpace()
static const uint64_t nMinDiskSpace = 52428800;
@@ -108,9 +112,6 @@ struct CNodeStateStats;
struct CBlockTemplate;
-/** Set up internal signal handlers **/
-void RegisterInternalSignals();
-
/** Register a wallet to receive updates from core */
void RegisterWallet(CWalletInterface* pwalletIn);
/** Unregister a wallet from core */
@@ -245,14 +246,7 @@ struct CDiskTxPos : public CDiskBlockPos
};
-
-enum GetMinFee_mode
-{
- GMF_RELAY,
- GMF_SEND,
-};
-
-int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode);
+int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
//
// Check transaction inputs, and make sure any
@@ -459,7 +453,7 @@ public:
int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
bool IsInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
int GetBlocksToMaturity() const;
- bool AcceptToMemoryPool(bool fLimitFree=true);
+ bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
};
@@ -718,7 +712,7 @@ public:
// (memory only) Sequencial id assigned to distinguish order in which blocks are received.
uint32_t nSequenceId;
- CBlockIndex()
+ void SetNull()
{
phashBlock = NULL;
pprev = NULL;
@@ -740,20 +734,14 @@ public:
nNonce = 0;
}
+ CBlockIndex()
+ {
+ SetNull();
+ }
+
CBlockIndex(CBlockHeader& block)
{
- phashBlock = NULL;
- pprev = NULL;
- pskip = NULL;
- nHeight = 0;
- nFile = 0;
- nDataPos = 0;
- nUndoPos = 0;
- nChainWork = 0;
- nTx = 0;
- nChainTx = 0;
- nStatus = 0;
- nSequenceId = 0;
+ SetNull();
nVersion = block.nVersion;
hashMerkleRoot = block.hashMerkleRoot;