File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -80,18 +80,16 @@ static void SipHash_32b(benchmark::State& state)
80
80
static void FastRandom_32bit (benchmark::State& state)
81
81
{
82
82
FastRandomContext rng (true );
83
- uint32_t x = 0 ;
84
83
while (state.KeepRunning ()) {
85
- x += rng.rand32 ();
84
+ rng.rand32 ();
86
85
}
87
86
}
88
87
89
88
static void FastRandom_1bit (benchmark::State& state)
90
89
{
91
90
FastRandomContext rng (true );
92
- uint32_t x = 0 ;
93
91
while (state.KeepRunning ()) {
94
- x += rng.randbool ();
92
+ rng.randbool ();
95
93
}
96
94
}
97
95
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ static void RollingBloom(benchmark::State& state)
12
12
CRollingBloomFilter filter (120000 , 0.000001 );
13
13
std::vector<unsigned char > data (32 );
14
14
uint32_t count = 0 ;
15
- uint64_t match = 0 ;
16
15
while (state.KeepRunning ()) {
17
16
count++;
18
17
data[0 ] = count;
@@ -25,7 +24,7 @@ static void RollingBloom(benchmark::State& state)
25
24
data[1 ] = count >> 16 ;
26
25
data[2 ] = count >> 8 ;
27
26
data[3 ] = count;
28
- match += filter.contains (data);
27
+ filter.contains (data);
29
28
}
30
29
}
31
30
Original file line number Diff line number Diff line change @@ -937,17 +937,19 @@ BOOST_AUTO_TEST_CASE(script_build)
937
937
}
938
938
}
939
939
940
+ #ifdef UPDATE_JSON_TESTS
940
941
std::string strGen;
941
-
942
+ # endif
942
943
for (TestBuilder& test : tests) {
943
944
test.Test ();
944
945
std::string str = JSONPrettyPrint (test.GetJSON ());
945
- #ifndef UPDATE_JSON_TESTS
946
+ #ifdef UPDATE_JSON_TESTS
947
+ strGen += str + " ,\n " ;
948
+ #else
946
949
if (tests_set.count (str) == 0 ) {
947
950
BOOST_CHECK_MESSAGE (false , " Missing auto script_valid test: " + test.GetComment ());
948
951
}
949
952
#endif
950
- strGen += str + " ,\n " ;
951
953
}
952
954
953
955
#ifdef UPDATE_JSON_TESTS
Original file line number Diff line number Diff line change @@ -640,19 +640,14 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
640
640
innerUsage += memusage::DynamicUsage (links.parents ) + memusage::DynamicUsage (links.children );
641
641
bool fDependsWait = false ;
642
642
setEntries setParentCheck;
643
- int64_t parentSizes = 0 ;
644
- int64_t parentSigOpCost = 0 ;
645
643
for (const CTxIn &txin : tx.vin ) {
646
644
// Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.
647
645
indexed_transaction_set::const_iterator it2 = mapTx.find (txin.prevout .hash );
648
646
if (it2 != mapTx.end ()) {
649
647
const CTransaction& tx2 = it2->GetTx ();
650
648
assert (tx2.vout .size () > txin.prevout .n && !tx2.vout [txin.prevout .n ].IsNull ());
651
649
fDependsWait = true ;
652
- if (setParentCheck.insert (it2).second ) {
653
- parentSizes += it2->GetTxSize ();
654
- parentSigOpCost += it2->GetSigOpCost ();
655
- }
650
+ setParentCheck.insert (it2);
656
651
} else {
657
652
assert (pcoins->HaveCoin (txin.prevout ));
658
653
}
You can’t perform that action at this time.
0 commit comments