Skip to content

Commit b8b4c80

Browse files
TheBlueMattajtowns
authored andcommitted
[refactor] drop IsInvalid(nDoSOut)
Co-authored-by: Anthony Towns <[email protected]>
1 parent 8818729 commit b8b4c80

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/consensus/validation.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@ class CValidationState {
7171
bool IsError() const {
7272
return mode == MODE_ERROR;
7373
}
74-
bool IsInvalid(int &nDoSOut) const {
75-
if (IsInvalid()) {
76-
nDoSOut = nDoS;
77-
return true;
78-
}
79-
return false;
80-
}
8174
bool CorruptionPossible() const {
8275
return corruptionPossible;
8376
}

src/test/txvalidation_tests.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_reject_coinbase, TestChain100Setup)
5252
// Check that the validation state reflects the unsuccessful attempt.
5353
BOOST_CHECK(state.IsInvalid());
5454
BOOST_CHECK_EQUAL(state.GetRejectReason(), "coinbase");
55-
56-
int nDoS;
57-
BOOST_CHECK_EQUAL(state.IsInvalid(nDoS), true);
58-
BOOST_CHECK_EQUAL(nDoS, 100);
5955
}
6056

6157
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)