diff options
| author | Gavin Andresen <[email protected]> | 2013-01-14 11:41:19 -0800 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-01-14 11:41:19 -0800 |
| commit | 1b722297976f0dc1a1824c87b46dda98dc73d317 (patch) | |
| tree | f9f65a870bbf5d82c07dde8983f1d01e3681e11f /src/main.cpp | |
| parent | Merge pull request #2099 from gavinandresen/blkfile_upgrade (diff) | |
| parent | Remove fClient (diff) | |
| download | discoin-1b722297976f0dc1a1824c87b46dda98dc73d317.tar.xz discoin-1b722297976f0dc1a1824c87b46dda98dc73d317.zip | |
Merge pull request #2161 from sipa/noclient
Remove fClient
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/src/main.cpp b/src/main.cpp index 6be8dea4e..cb7975af0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -467,28 +467,21 @@ CTransaction::GetLegacySigOpCount() const int CMerkleTx::SetMerkleBranch(const CBlock* pblock) { - if (fClient) - { - if (hashBlock == 0) - return 0; - } - else - { - CBlock blockTmp; - - if (pblock == NULL) { - CCoins coins; - if (pcoinsTip->GetCoins(GetHash(), coins)) { - CBlockIndex *pindex = FindBlockByHeight(coins.nHeight); - if (pindex) { - if (!blockTmp.ReadFromDisk(pindex)) - return 0; - pblock = &blockTmp; - } + CBlock blockTmp; + + if (pblock == NULL) { + CCoins coins; + if (pcoinsTip->GetCoins(GetHash(), coins)) { + CBlockIndex *pindex = FindBlockByHeight(coins.nHeight); + if (pindex) { + if (!blockTmp.ReadFromDisk(pindex)) + return 0; + pblock = &blockTmp; } } + } - if (pblock) { + if (pblock) { // Update the tx's hashBlock hashBlock = pblock->GetHash(); @@ -506,7 +499,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 @@ -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); - } + return CTransaction::AcceptToMemoryPool(fCheckInputs); } |