Make RelayWalletTransaction attempt to AcceptToMemoryPool.

This commit is contained in:
Gregory Maxwell
2016-12-06 06:39:14 +00:00
committed by lateminer
parent b2b7ba690f
commit 0fab6dc7aa

View File

@@ -1831,9 +1831,10 @@ void CWallet::ReacceptWalletTransactions()
bool CWalletTx::RelayWalletTransaction()
{
assert(pwallet->GetBroadcastTransactions());
if (!IsCoinBase() && !IsCoinStake())
if (!(IsCoinBase() || IsCoinStake()) && !isAbandoned() && GetDepthInMainChain() == 0)
{
if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) {
/* GetDepthInMainChain already catches known conflicts. */
if (InMempool() || AcceptToMemoryPool(false, maxTxFee)) {
LogPrintf("Relaying wtx %s\n", GetHash().ToString());
CFeeRate feeRate;
mempool.lookupFeeRate(GetHash(), feeRate);