Merge #9290: Make RelayWalletTransaction attempt to AcceptToMemoryPool.

f692fce Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
This commit is contained in:
Pieter Wuille 2016-12-14 01:26:39 -08:00
commit 57e337d40e
No known key found for this signature in database
GPG key ID: DBA1A67379A1A931

View file

@ -1542,9 +1542,11 @@ void CWallet::ReacceptWalletTransactions()
bool CWalletTx::RelayWalletTransaction(CConnman* connman)
{
assert(pwallet->GetBroadcastTransactions());
if (!IsCoinBase())
if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0)
{
if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) {
CValidationState state;
/* GetDepthInMainChain already catches known conflicts. */
if (InMempool() || AcceptToMemoryPool(maxTxFee, state)) {
LogPrintf("Relaying wtx %s\n", GetHash().ToString());
if (connman) {
CInv inv(MSG_TX, GetHash());