Merge pull request #2161 from sipa/noclient

Remove fClient
This commit is contained in:
Gavin Andresen 2013-01-14 11:41:19 -08:00
commit 1b72229797
3 changed files with 13 additions and 32 deletions

View file

@ -467,13 +467,6 @@ CTransaction::GetLegacySigOpCount() const
int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
{
if (fClient)
{
if (hashBlock == 0)
return 0;
}
else
{
CBlock blockTmp;
if (pblock == NULL) {
@ -507,7 +500,6 @@ int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
// Fill in merkle branch
vMerkleBranch = pblock->GetMerkleBranch(nIndex);
}
}
// Is the tx in a block that's in the main chain
map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
@ -915,16 +907,7 @@ int CMerkleTx::GetBlocksToMaturity() const
bool CMerkleTx::AcceptToMemoryPool(bool fCheckInputs)
{
if (fClient)
{
if (!IsInMainChain() && !ClientCheckInputs())
return false;
return CTransaction::AcceptToMemoryPool(false);
}
else
{
return CTransaction::AcceptToMemoryPool(fCheckInputs);
}
}

View file

@ -45,10 +45,9 @@ struct LocalServiceInfo {
//
// Global state variables
//
bool fClient = false;
bool fDiscover = true;
bool fUseUPnP = false;
uint64 nLocalServices = (fClient ? 0 : NODE_NETWORK);
uint64 nLocalServices = NODE_NETWORK;
static CCriticalSection cs_mapLocalHost;
static map<CNetAddr, LocalServiceInfo> mapLocalHost;
static bool vfReachable[NET_MAX] = {};

View file

@ -86,7 +86,6 @@ enum threadId
THREAD_MAX
};
extern bool fClient;
extern bool fDiscover;
extern bool fUseUPnP;
extern uint64 nLocalServices;