mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Break dependency of init on wallet.
This required some code movement (what was CWalletTx::AcceptToMemoryPool doing in main?), and adding a few explicit includes that used to be implicit through init.h.
This commit is contained in:
21
src/main.cpp
21
src/main.cpp
@@ -1054,27 +1054,6 @@ bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree)
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool CWalletTx::AcceptWalletTransaction()
|
||||
{
|
||||
{
|
||||
LOCK(mempool.cs);
|
||||
// Add previous supporting transactions first
|
||||
BOOST_FOREACH(CMerkleTx& tx, vtxPrev)
|
||||
{
|
||||
if (!tx.IsCoinBase())
|
||||
{
|
||||
uint256 hash = tx.GetHash();
|
||||
if (!mempool.exists(hash) && pcoinsTip->HaveCoins(hash))
|
||||
tx.AcceptToMemoryPool(false);
|
||||
}
|
||||
}
|
||||
return AcceptToMemoryPool(false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock
|
||||
bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, bool fAllowSlow)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user