mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
[refactor] add TxDownloadManager wrapping TxOrphanage, TxRequestTracker, and bloom filters
This module is going to be responsible for managing everything related to transaction download, including txrequest, orphan transactions and package relay. It will be responsible for managing usage of the TxOrphanage and instructing PeerManager: - what tx or package-related messages to send to which peer - whether a tx or package-related message is allowed or useful - what transactions are available to try accepting to mempool Future commits will consolidate the interface and re-delegate interactions from PeerManager to TxDownloadManager.
This commit is contained in:
34
src/node/txdownloadman_impl.cpp
Normal file
34
src/node/txdownloadman_impl.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2024
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <node/txdownloadman_impl.h>
|
||||
#include <node/txdownloadman.h>
|
||||
|
||||
namespace node {
|
||||
TxDownloadManager::TxDownloadManager() :
|
||||
m_impl{std::make_unique<TxDownloadManagerImpl>()}
|
||||
{}
|
||||
TxDownloadManager::~TxDownloadManager() = default;
|
||||
|
||||
TxOrphanage& TxDownloadManager::GetOrphanageRef()
|
||||
{
|
||||
return m_impl->m_orphanage;
|
||||
}
|
||||
TxRequestTracker& TxDownloadManager::GetTxRequestRef()
|
||||
{
|
||||
return m_impl->m_txrequest;
|
||||
}
|
||||
CRollingBloomFilter& TxDownloadManager::RecentRejectsFilter()
|
||||
{
|
||||
return m_impl->RecentRejectsFilter();
|
||||
}
|
||||
CRollingBloomFilter& TxDownloadManager::RecentRejectsReconsiderableFilter()
|
||||
{
|
||||
return m_impl->RecentRejectsReconsiderableFilter();
|
||||
}
|
||||
CRollingBloomFilter& TxDownloadManager::RecentConfirmedTransactionsFilter()
|
||||
{
|
||||
return m_impl->RecentConfirmedTransactionsFilter();
|
||||
}
|
||||
} // namespace node
|
||||
Reference in New Issue
Block a user