Skip to content

Commit 2f35aa0

Browse files
committed
Fix expected cache hit count in acceptance test
1 parent 37e9d85 commit 2f35aa0

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/herder/test/HerderTests.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,12 +3099,14 @@ testSCPDriver(uint32 protocolVersion, uint32_t maxTxSetSize, size_t expectedOps)
30993099

31003100
// Triggering next ledger will construct and cache the block
31013101
herder.triggerNextLedger(seq, true);
3102-
// All hits during the whole SCP round. If CAP-0083 is supported we
3103-
// expect 1 more cache hit for the validity check that determins whether
3104-
// or not to replace the transaction set with an empty one.
3105-
uint64_t const expectedHits =
3106-
herder.getHerderSCPDriver().protocolAllowsEmptyTxSetValues() ? 11
3107-
: 10;
3102+
#ifdef CAP_0083
3103+
// All hits during the whole SCP round. If CAP-0083 support is compiled
3104+
// in, we expect 1 more cache hit for the validity check that determines
3105+
// whether or not to replace the transaction set with an empty one.
3106+
uint64_t const expectedHits = 11;
3107+
#else
3108+
uint64_t const expectedHits = 10;
3109+
#endif
31083110
REQUIRE(cache.getCounters().mHits == expectedHits);
31093111
// One miss from the initial makeTxSetFromTransactions
31103112
REQUIRE(cache.getCounters().mMisses == 1);

0 commit comments

Comments
 (0)