File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -5067,12 +5067,18 @@ bool LoadMempool(CTxMemPool& pool)
5067
5067
pool.PrioritiseTransaction (i.first , i.second );
5068
5068
}
5069
5069
5070
- std::set<uint256> unbroadcast_txids;
5071
- file >> unbroadcast_txids;
5072
- unbroadcast = unbroadcast_txids.size ();
5070
+ // TODO: remove this try except in v0.22
5071
+ try {
5072
+ std::set<uint256> unbroadcast_txids;
5073
+ file >> unbroadcast_txids;
5074
+ unbroadcast = unbroadcast_txids.size ();
5073
5075
5074
- for (const auto & txid : unbroadcast_txids) {
5076
+ for (const auto & txid : unbroadcast_txids) {
5075
5077
pool.AddUnbroadcastTx (txid);
5078
+ }
5079
+ } catch (const std::exception&) {
5080
+ // mempool.dat files created prior to v0.21 will not have an
5081
+ // unbroadcast set. No need to log a failure if parsing fails here.
5076
5082
}
5077
5083
5078
5084
} catch (const std::exception& e) {
You can’t perform that action at this time.
0 commit comments