From 214c4ecb9ab306627a08abb35cf82c73f10ec627 Mon Sep 17 00:00:00 2001
From: John Newbery <john@johnnewbery.com>
Date: Tue, 6 Aug 2019 14:38:34 -0400
Subject: [wallet] restore coinbase check in SubmitMemoryPoolAndRelay()

This check doesn't change mempool acceptance/relay behaviour, but reduces log spam.
---
 src/wallet/wallet.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index b3269083ec..4701bd3564 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2160,6 +2160,9 @@ bool CWalletTx::SubmitMemoryPoolAndRelay(std::string& err_string, bool relay)
     if (!pwallet->GetBroadcastTransactions()) return false;
     // Don't relay abandoned transactions
     if (isAbandoned()) return false;
+    // Don't try to submit coinbase transactions. These would fail anyway but would
+    // cause log spam.
+    if (IsCoinBase()) return false;
 
     // Submit transaction to mempool for relay
     pwallet->WalletLogPrintf("Submitting wtx %s to mempool for relay\n", GetHash().ToString());
-- 
cgit v1.2.3