Skip to content

Commit 08d9373

Browse files
committed
Remove unused code from wallet and validation interface
Fixes #6109
1 parent 26e08a1 commit 08d9373

File tree

4 files changed

+0
-19
lines changed

4 files changed

+0
-19
lines changed

src/validationinterface.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ CMainSignals& GetMainSignals()
1414

1515
void RegisterValidationInterface(CValidationInterface* pwalletIn) {
1616
g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2));
17-
g_signals.EraseTransaction.connect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, _1));
1817
g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
1918
g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
2019
g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
@@ -28,7 +27,6 @@ void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
2827
g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
2928
g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
3029
g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
31-
g_signals.EraseTransaction.disconnect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, _1));
3230
g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2));
3331
}
3432

@@ -38,7 +36,6 @@ void UnregisterAllValidationInterfaces() {
3836
g_signals.Inventory.disconnect_all_slots();
3937
g_signals.SetBestChain.disconnect_all_slots();
4038
g_signals.UpdatedTransaction.disconnect_all_slots();
41-
g_signals.EraseTransaction.disconnect_all_slots();
4239
g_signals.SyncTransaction.disconnect_all_slots();
4340
}
4441

src/validationinterface.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL);
2929
class CValidationInterface {
3030
protected:
3131
virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {}
32-
virtual void EraseFromWallet(const uint256 &hash) {}
3332
virtual void SetBestChain(const CBlockLocator &locator) {}
3433
virtual void UpdatedTransaction(const uint256 &hash) {}
3534
virtual void Inventory(const uint256 &hash) {}
@@ -43,8 +42,6 @@ class CValidationInterface {
4342
struct CMainSignals {
4443
/** Notifies listeners of updated transaction data (transaction, and optionally the block it is found in. */
4544
boost::signals2::signal<void (const CTransaction &, const CBlock *)> SyncTransaction;
46-
/** Notifies listeners of an erased transaction (currently disabled, requires transaction replacement). */
47-
boost::signals2::signal<void (const uint256 &)> EraseTransaction;
4845
/** Notifies listeners of an updated transaction without new data (for now: a coinbase potentially becoming visible). */
4946
boost::signals2::signal<void (const uint256 &)> UpdatedTransaction;
5047
/** Notifies listeners of a new active block chain. */

src/wallet/wallet.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -775,18 +775,6 @@ void CWallet::SyncTransaction(const CTransaction& tx, const CBlock* pblock)
775775
}
776776
}
777777

778-
void CWallet::EraseFromWallet(const uint256 &hash)
779-
{
780-
if (!fFileBacked)
781-
return;
782-
{
783-
LOCK(cs_wallet);
784-
if (mapWallet.erase(hash))
785-
CWalletDB(strWalletFile).EraseTx(hash);
786-
}
787-
return;
788-
}
789-
790778

791779
isminetype CWallet::IsMine(const CTxIn &txin) const
792780
{

src/wallet/wallet.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,6 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
615615
bool AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletDB* pwalletdb);
616616
void SyncTransaction(const CTransaction& tx, const CBlock* pblock);
617617
bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate);
618-
void EraseFromWallet(const uint256 &hash);
619618
int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false);
620619
void ReacceptWalletTransactions();
621620
void ResendWalletTransactions(int64_t nBestBlockTime);

0 commit comments

Comments
 (0)