Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dandelion removal #79

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ void Shutdown(NodeContext& node)
util::ThreadRename("shutoff");
if (node.mempool) node.mempool->AddTransactionsUpdated(1);

// Changes to mempool should also be made to Dandelion stempool
if (node.stempool) node.stempool->AddTransactionsUpdated(1);

StopHTTPRPC();
StopREST();
StopRPC();
Expand Down Expand Up @@ -1180,18 +1177,16 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
if (!ignores_incoming_txs) node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();

assert(!node.mempool);
assert(!node.stempool);
int check_ratio = std::min<int>(std::max<int>(args.GetArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
node.mempool = std::make_unique<CTxMemPool>(node.fee_estimator.get(), check_ratio);
node.stempool = std::make_unique<CTxMemPool>(node.fee_estimator.get(), check_ratio);

assert(!node.chainman);
node.chainman = std::make_unique<ChainstateManager>();
ChainstateManager& chainman = *node.chainman;

assert(!node.peerman);
node.peerman = PeerManager::make(chainparams, *node.connman, *node.addrman, node.banman.get(),
*node.scheduler, chainman, *node.mempool, *node.stempool, ignores_incoming_txs);
*node.scheduler, chainman, *node.mempool, ignores_incoming_txs);
RegisterValidationInterface(node.peerman.get());

// sanitize comments per BIP-0014, format user agent and check total size
Expand Down Expand Up @@ -1369,11 +1364,11 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
const int64_t load_block_index_start_time = GetTimeMillis();
try {
LOCK(cs_main);
chainman.InitializeChainstate(Assert(node.mempool.get()), Assert(node.stempool.get()));
chainman.InitializeChainstate(Assert(node.mempool.get()));
chainman.m_total_coinstip_cache = nCoinCacheUsage;
chainman.m_total_coinsdb_cache = nCoinDBCache;

UnloadBlockIndex(node.mempool.get(), node.stempool.get(), chainman);
UnloadBlockIndex(node.mempool.get(), chainman);

// new CBlockTreeDB tries to delete the existing file, which
// fails if it's still open from the previous loop. Close it first:
Expand Down Expand Up @@ -1815,11 +1810,6 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
banman->DumpBanlist();
}, DUMP_BANS_INTERVAL);

CConnman* connman = node.connman.get();
node.scheduler->scheduleEvery([connman]{
connman->CheckDandelionShuffle();
}, CHECK_DANDELION_SHUFFLE_INTERVAL);

#if HAVE_SYSTEM
StartupNotify(args);
#endif
Expand Down
1 change: 0 additions & 1 deletion src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ const CLogCategoryDesc LogCategories[] =
{BCLog::COINDB, "coindb"},
{BCLog::QT, "qt"},
{BCLog::LEVELDB, "leveldb"},
{BCLog::DANDELION, "dandelion"},
{BCLog::VALIDATION, "validation"},
{BCLog::I2P, "i2p"},
{BCLog::IPC, "ipc"},
Expand Down
1 change: 0 additions & 1 deletion src/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ namespace BCLog {
VALIDATION = (1 << 21),
I2P = (1 << 22),
IPC = (1 << 23),
DANDELION = (1 << 24),
ALL = ~(uint32_t)0,
};

Expand Down
Loading