mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[wallet] Schedule tx rebroadcasts in wallet
Removes the now-unused Broadcast/ResendWalletTransactions interface from validationinterface. The wallet_resendwallettransactions.py needs a sleep added at the start to make sure that the rebroadcast scheduler is warmed up before the next block is mined.
This commit is contained in:
@@ -207,16 +207,6 @@ public:
|
||||
m_notifications->UpdatedBlockTip();
|
||||
}
|
||||
void ChainStateFlushed(const CBlockLocator& locator) override { m_notifications->ChainStateFlushed(locator); }
|
||||
void ResendWalletTransactions(CConnman*) override
|
||||
{
|
||||
// `cs_main` is always held when this method is called, so it is safe to
|
||||
// call `assumeLocked`. This is awkward, and the `assumeLocked` method
|
||||
// should be able to be removed entirely if `ResendWalletTransactions`
|
||||
// is replaced by a wallet timer as suggested in
|
||||
// https://github.com/bitcoin/bitcoin/issues/15619
|
||||
auto locked_chain = m_chain.assumeLocked();
|
||||
m_notifications->ResendWalletTransactions(*locked_chain);
|
||||
}
|
||||
Chain& m_chain;
|
||||
Chain::Notifications* m_notifications;
|
||||
};
|
||||
@@ -351,6 +341,7 @@ public:
|
||||
CAmount maxTxFee() override { return ::maxTxFee; }
|
||||
bool getPruneMode() override { return ::fPruneMode; }
|
||||
bool p2pEnabled() override { return g_connman != nullptr; }
|
||||
bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !IsInitialBlockDownload(); }
|
||||
bool isInitialBlockDownload() override { return IsInitialBlockDownload(); }
|
||||
bool shutdownRequested() override { return ShutdownRequested(); }
|
||||
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
|
||||
|
||||
Reference in New Issue
Block a user