Skip to content

Commit 7ff0535

Browse files
committed
[mempool] Remove error suppression on upgrade
In 0.21, we added unbroadcast txids to mempool.dat. Commit 9c8a55d added a try-block to prevent throwing a "failed to deserialize mempool data" error when a user upgrades from 0.21 to 0.22. This exception handling is no longer useful, so now we can remove it.
1 parent bc8ada1 commit 7ff0535

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/validation.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5035,15 +5035,9 @@ bool LoadMempool(CTxMemPool& pool)
50355035
pool.PrioritiseTransaction(i.first, i.second);
50365036
}
50375037

5038-
// TODO: remove this try except in v0.22
50395038
std::set<uint256> unbroadcast_txids;
5040-
try {
5041-
file >> unbroadcast_txids;
5042-
unbroadcast = unbroadcast_txids.size();
5043-
} catch (const std::exception&) {
5044-
// mempool.dat files created prior to v0.21 will not have an
5045-
// unbroadcast set. No need to log a failure if parsing fails here.
5046-
}
5039+
file >> unbroadcast_txids;
5040+
unbroadcast = unbroadcast_txids.size();
50475041
for (const auto& txid : unbroadcast_txids) {
50485042
// Ensure transactions were accepted to mempool then add to
50495043
// unbroadcast set.

0 commit comments

Comments
 (0)