aboutsummaryrefslogtreecommitdiff
path: root/src/test/txvalidation_tests.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-10-24 11:35:42 -0400
committerJohn Newbery <john@johnnewbery.com>2019-10-29 15:46:45 -0400
commita27a2957ed9afbe5a96caa5f0f4cbec730d27460 (patch)
treee83a88e5984432ac8ac8b54b623f4c0ee88fc3b4 /src/test/txvalidation_tests.cpp
parent48cb468ce3f52195dfc64c6df88b8af36b77dbb0 (diff)
downloadbitcoin-a27a2957ed9afbe5a96caa5f0f4cbec730d27460.tar.xz
[validation] Add CValidationState subclasses
Split CValidationState into TxValidationState and BlockValidationState to store validation results for transactions and blocks respectively.
Diffstat (limited to 'src/test/txvalidation_tests.cpp')
-rw-r--r--src/test/txvalidation_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/txvalidation_tests.cpp b/src/test/txvalidation_tests.cpp
index 2356e0ccdc..1f781ca83a 100644
--- a/src/test/txvalidation_tests.cpp
+++ b/src/test/txvalidation_tests.cpp
@@ -30,7 +30,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_reject_coinbase, TestChain100Setup)
BOOST_CHECK(CTransaction(coinbaseTx).IsCoinBase());
- CValidationState state;
+ TxValidationState state;
LOCK(cs_main);
@@ -50,7 +50,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_reject_coinbase, TestChain100Setup)
// Check that the validation state reflects the unsuccessful attempt.
BOOST_CHECK(state.IsInvalid());
BOOST_CHECK_EQUAL(state.GetRejectReason(), "coinbase");
- BOOST_CHECK(state.GetReason() == ValidationInvalidReason::CONSENSUS);
+ BOOST_CHECK(state.GetResult() == TxValidationResult::TX_CONSENSUS);
}
BOOST_AUTO_TEST_SUITE_END()