diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -627,9 +627,11 @@
     void AddToSpends(const COutPoint &outpoint, const TxId &wtxid);
     void AddToSpends(const TxId &wtxid);
 
-    /* Mark a transaction (and its in-wallet descendants) as conflicting with a
-     * particular block. */
-    void MarkConflicted(const uint256 &hashBlock, const uint256 &hashTx);
+    /**
+     * Mark a transaction (and its in-wallet descendants) as conflicting with a
+     * particular block.
+     */
+    void MarkConflicted(const uint256 &hashBlock, const TxId &txid);
 
     void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>);
 
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1256,7 +1256,7 @@
     return true;
 }
 
-void CWallet::MarkConflicted(const uint256 &hashBlock, const uint256 &hashTx) {
+void CWallet::MarkConflicted(const uint256 &hashBlock, const TxId &txid) {
     LOCK2(cs_main, cs_wallet);
 
     int conflictconfirms = 0;
@@ -1277,13 +1277,13 @@
     // Do not flush the wallet here for performance reasons.
     CWalletDB walletdb(*dbw, "r+", false);
 
-    std::set<uint256> todo;
-    std::set<uint256> done;
+    std::set<TxId> todo;
+    std::set<TxId> done;
 
-    todo.insert(hashTx);
+    todo.insert(txid);
 
     while (!todo.empty()) {
-        uint256 now = *todo.begin();
+        const TxId now = *todo.begin();
         todo.erase(now);
         done.insert(now);
         assert(mapWallet.count(now));