mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Add wtxid to mempool unbroadcast tracking
This commit is contained in:
committed by
Suhas Daftuar
parent
2b4b90aa8f
commit
c7eb6b4f1f
@@ -830,14 +830,14 @@ void PeerLogicValidation::InitializeNode(CNode *pnode) {
|
||||
|
||||
void PeerLogicValidation::ReattemptInitialBroadcast(CScheduler& scheduler) const
|
||||
{
|
||||
std::set<uint256> unbroadcast_txids = m_mempool.GetUnbroadcastTxs();
|
||||
std::map<uint256, uint256> unbroadcast_txids = m_mempool.GetUnbroadcastTxs();
|
||||
|
||||
for (const uint256& txid : unbroadcast_txids) {
|
||||
for (const auto& elem : unbroadcast_txids) {
|
||||
// Sanity check: all unbroadcast txns should exist in the mempool
|
||||
if (m_mempool.exists(txid)) {
|
||||
RelayTransaction(txid, *connman);
|
||||
if (m_mempool.exists(elem.first)) {
|
||||
RelayTransaction(elem.first, *connman);
|
||||
} else {
|
||||
m_mempool.RemoveUnbroadcastTx(txid, true);
|
||||
m_mempool.RemoveUnbroadcastTx(elem.first, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user