diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2021-01-04 12:02:29 -0800 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2021-01-04 12:02:29 -0800 |
commit | 7ff05358a96f49ae6b7eb265ce301748bfde30a8 (patch) | |
tree | 9160f7ab636a4ecc790f4af002541e98fba9dc0f | |
parent | bc8ada1c15345d14e324aee68488c8aa8a75cae0 (diff) |
[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.
-rw-r--r-- | src/validation.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 2585345dee..cc125a2a41 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5035,15 +5035,9 @@ bool LoadMempool(CTxMemPool& pool) pool.PrioritiseTransaction(i.first, i.second); } - // TODO: remove this try except in v0.22 std::set<uint256> unbroadcast_txids; - try { - file >> unbroadcast_txids; - unbroadcast = unbroadcast_txids.size(); - } catch (const std::exception&) { - // mempool.dat files created prior to v0.21 will not have an - // unbroadcast set. No need to log a failure if parsing fails here. - } + file >> unbroadcast_txids; + unbroadcast = unbroadcast_txids.size(); for (const auto& txid : unbroadcast_txids) { // Ensure transactions were accepted to mempool then add to // unbroadcast set. |