Skip to content

Commit e570aeb

Browse files
Remove unused function
1 parent 7a628e0 commit e570aeb

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/wallet/wallet.cpp

-20
Original file line numberDiff line numberDiff line change
@@ -2022,26 +2022,6 @@ void CWallet::ReacceptWalletTransactions()
20222022
}
20232023
}
20242024

2025-
void CWallet::AbandonOrphanedCoinstakes()
2026-
{
2027-
LOCK(cs_wallet);
2028-
2029-
for (std::pair<const uint256, CWalletTx>& item : mapWallet) {
2030-
const uint256& wtxid = item.first;
2031-
CWalletTx& wtx = item.second;
2032-
assert(wtx.GetHash() == wtxid);
2033-
2034-
int nDepth = wtx.GetDepthInMainChain();
2035-
2036-
if (nDepth == 0 && !wtx.isAbandoned() && wtx.IsCoinStake()) {
2037-
LogPrintf("Abandoning coinstake wtx %s\n", wtx.GetHash().ToString());
2038-
if (!AbandonTransaction(wtxid)) {
2039-
LogPrintf("Failed to abandon coinstake tx %s\n", wtx.GetHash().ToString());
2040-
}
2041-
}
2042-
}
2043-
}
2044-
20452025
bool CWalletTx::SubmitMemoryPoolAndRelay(std::string& err_string, bool relay, CAmount override_max_fee)
20462026
{
20472027
// Can't relay if wallet is not broadcasting

src/wallet/wallet.h

-3
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,6 @@ friend class CWalletTx;
821821
}
822822
WalletDatabase& GetDatabase() const override { return *database; }
823823

824-
// Scheuler function to abandon orphaned coinstakes
825-
void AbandonOrphanedCoinstakes();
826-
827824
/**
828825
* Select a set of coins such that nValueRet >= nTargetValue and at least
829826
* all coins from coinControl are selected; Never select unconfirmed coins

0 commit comments

Comments
 (0)