mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Add wtxid to mempool unbroadcast tracking
This commit is contained in:
parent
2b4b90aa8f
commit
c7eb6b4f1f
4 changed files with 24 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue