31
31
#include < logging/timer.h>
32
32
#include < node/blockstorage.h>
33
33
#include < node/utxo_snapshot.h>
34
- #include < policy/v3_policy.h>
35
34
#include < policy/policy.h>
36
35
#include < policy/rbf.h>
37
36
#include < policy/settings.h>
37
+ #include < policy/v3_policy.h>
38
38
#include < pow.h>
39
39
#include < primitives/block.h>
40
40
#include < primitives/transaction.h>
57
57
#include < util/result.h>
58
58
#include < util/signalinterrupt.h>
59
59
#include < util/strencodings.h>
60
+ #include < util/string.h>
60
61
#include < util/time.h>
61
62
#include < util/trace.h>
62
63
#include < util/translation.h>
@@ -2847,13 +2848,6 @@ void Chainstate::PruneAndFlush()
2847
2848
}
2848
2849
}
2849
2850
2850
- /* * Private helper function that concatenates warning messages. */
2851
- static void AppendWarning (bilingual_str& res, const bilingual_str& warn)
2852
- {
2853
- if (!res.empty ()) res += Untranslated (" , " );
2854
- res += warn;
2855
- }
2856
-
2857
2851
static void UpdateTipLog (
2858
2852
const CCoinsViewCache& coins_tip,
2859
2853
const CBlockIndex* tip,
@@ -2904,7 +2898,7 @@ void Chainstate::UpdateTip(const CBlockIndex* pindexNew)
2904
2898
g_best_block_cv.notify_all ();
2905
2899
}
2906
2900
2907
- bilingual_str warning_messages;
2901
+ std::vector< bilingual_str> warning_messages;
2908
2902
if (!m_chainman.IsInitialBlockDownload ()) {
2909
2903
const CBlockIndex* pindex = pindexNew;
2910
2904
for (int bit = 0 ; bit < VERSIONBITS_NUM_BITS; bit++) {
@@ -2915,12 +2909,13 @@ void Chainstate::UpdateTip(const CBlockIndex* pindexNew)
2915
2909
if (state == ThresholdState::ACTIVE) {
2916
2910
m_chainman.GetNotifications ().warning (warning);
2917
2911
} else {
2918
- AppendWarning ( warning_messages, warning);
2912
+ warning_messages. push_back ( warning);
2919
2913
}
2920
2914
}
2921
2915
}
2922
2916
}
2923
- UpdateTipLog (coins_tip, pindexNew, params, __func__, " " , warning_messages.original );
2917
+ UpdateTipLog (coins_tip, pindexNew, params, __func__, " " ,
2918
+ util::Join (warning_messages, Untranslated (" , " )).original );
2924
2919
}
2925
2920
2926
2921
/* * Disconnect m_chain's tip.
0 commit comments