aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-10-19 17:21:49 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-10-26 14:49:47 +0200
commitfe5234645036178a540fdd4166b26493b0b40529 (patch)
tree37e7d06501542b28ebe30c4d44ee49a2ae8b7e11
parent0d09b3e8b0218169ab7ad2aa787c43ea11bc7060 (diff)
Do not treat fFromMe transaction differently when broadcasting
-rw-r--r--src/main.cpp19
-rw-r--r--src/wallet.cpp14
-rw-r--r--src/wallet.h2
3 files changed, 0 insertions, 35 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 01a1babc7f..f9c49a6f34 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -97,16 +97,6 @@ void UnregisterAllWallets()
setpwalletRegistered.clear();
}
-// get the wallet transaction with the given hash (if it exists)
-bool static GetTransaction(const uint256& hashTx, CWalletTx& wtx)
-{
- LOCK(cs_setpwalletRegistered);
- BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered)
- if (pwallet->GetTransaction(hashTx,wtx))
- return true;
- return false;
-}
-
// erases transaction with the given hash from all wallets
void static EraseFromWallets(uint256 hash)
{
@@ -4241,15 +4231,6 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
hashRand = Hash(BEGIN(hashRand), END(hashRand));
bool fTrickleWait = ((hashRand & 3) != 0);
- // always trickle our own transactions
- if (!fTrickleWait)
- {
- CWalletTx wtx;
- if (GetTransaction(inv.hash, wtx))
- if (wtx.fFromMe)
- fTrickleWait = true;
- }
-
if (fTrickleWait)
{
vInvWait.push_back(inv);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a7a2992bb9..e37a835782 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1498,20 +1498,6 @@ void CWallet::PrintWallet(const CBlock& block)
LogPrintf("\n");
}
-bool CWallet::GetTransaction(const uint256 &hashTx, CWalletTx& wtx)
-{
- {
- LOCK(cs_wallet);
- map<uint256, CWalletTx>::iterator mi = mapWallet.find(hashTx);
- if (mi != mapWallet.end())
- {
- wtx = (*mi).second;
- return true;
- }
- }
- return false;
-}
-
bool CWallet::SetDefaultKey(const CPubKey &vchPubKey)
{
if (fFileBacked)
diff --git a/src/wallet.h b/src/wallet.h
index f87e9b08c4..179709a15a 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -319,8 +319,6 @@ public:
return setKeyPool.size();
}
- bool GetTransaction(const uint256 &hashTx, CWalletTx& wtx);
-
bool SetDefaultKey(const CPubKey &vchPubKey);
// signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower