Skip to content

Commit dab3830

Browse files
committed
[Tests][Trivial] Remove annoying warning for unintended optimization
1 parent e1eb3f5 commit dab3830

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/budget_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class BudgetManagerTest : CBudgetManager
2222
mapFeeTxToBudget.emplace(finalizedBudget.GetFeeTXHash(), nHash);
2323
}
2424

25-
bool IsBlockValueValid(int nHeight, CAmount& nExpectedValue, CAmount nMinted, bool fSporkActive = true)
25+
bool IsBlockValueValid(int nHeight, CAmount nExpectedValue, CAmount nMinted, bool fSporkActive = true)
2626
{
2727
// suppose masternodeSync is complete
2828
if (fSporkActive) {
@@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(block_value)
6666

6767
// regular block
6868
int nHeight = 100;
69-
CAmount nExpected = GetBlockValue(nHeight);
69+
volatile CAmount nExpected = GetBlockValue(nHeight);
7070
BOOST_CHECK(t_budgetman.IsBlockValueValid(nHeight, nExpected, nExpected-1));
7171
BOOST_CHECK(t_budgetman.IsBlockValueValid(nHeight, nExpected, nExpected));
7272
BOOST_CHECK(!t_budgetman.IsBlockValueValid(nHeight, nExpected, nExpected+1));

0 commit comments

Comments
 (0)