Browse Source

Merge #9290: Make RelayWalletTransaction attempt to AcceptToMemoryPool.

f692fce Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
0.14
Pieter Wuille 8 years ago
parent
commit
57e337d40e
No known key found for this signature in database
GPG Key ID: DBA1A67379A1A931
  1. 6
      src/wallet/wallet.cpp

6
src/wallet/wallet.cpp

@ -1542,9 +1542,11 @@ void CWallet::ReacceptWalletTransactions() @@ -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());

Loading…
Cancel
Save