test: Check for updated empty-tx reject messages in transaction tests
This commit is contained in:
parent
7a2be88768
commit
9a5951aab1
|
@ -146,7 +146,7 @@ TEST(ChecktransactionTests, BadTxnsVinEmpty) {
|
|||
|
||||
CTransaction tx(mtx);
|
||||
MockCValidationState state;
|
||||
EXPECT_CALL(state, DoS(10, false, REJECT_INVALID, "bad-txns-vin-empty", false)).Times(1);
|
||||
EXPECT_CALL(state, DoS(10, false, REJECT_INVALID, "bad-txns-no-source-of-funds", false)).Times(1);
|
||||
CheckTransactionWithoutProofVerification(tx, state);
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ TEST(ChecktransactionTests, BadTxnsVoutEmpty) {
|
|||
CTransaction tx(mtx);
|
||||
|
||||
MockCValidationState state;
|
||||
EXPECT_CALL(state, DoS(10, false, REJECT_INVALID, "bad-txns-vout-empty", false)).Times(1);
|
||||
EXPECT_CALL(state, DoS(10, false, REJECT_INVALID, "bad-txns-no-sink-of-funds", false)).Times(1);
|
||||
CheckTransactionWithoutProofVerification(tx, state);
|
||||
}
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ void test_simple_sapling_invalidity(uint32_t consensusBranchId, CMutableTransact
|
|||
CValidationState state;
|
||||
|
||||
BOOST_CHECK(!CheckTransactionWithoutProofVerification(newTx, state));
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-vin-empty");
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-no-source-of-funds");
|
||||
}
|
||||
{
|
||||
CMutableTransaction newTx(tx);
|
||||
|
@ -385,7 +385,7 @@ void test_simple_sapling_invalidity(uint32_t consensusBranchId, CMutableTransact
|
|||
newTx.vShieldedSpend[0].nullifier = GetRandHash();
|
||||
|
||||
BOOST_CHECK(!CheckTransactionWithoutProofVerification(newTx, state));
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-vout-empty");
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-no-sink-of-funds");
|
||||
}
|
||||
{
|
||||
// Ensure that nullifiers are never duplicated within a transaction.
|
||||
|
@ -441,12 +441,12 @@ void test_simple_joinsplit_invalidity(uint32_t consensusBranchId, CMutableTransa
|
|||
|
||||
// No joinsplits, vin and vout, means it should be invalid.
|
||||
BOOST_CHECK(!CheckTransactionWithoutProofVerification(newTx, state));
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-vin-empty");
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-no-source-of-funds");
|
||||
|
||||
newTx.vin.push_back(CTxIn(uint256S("0000000000000000000000000000000000000000000000000000000000000001"), 0));
|
||||
|
||||
BOOST_CHECK(!CheckTransactionWithoutProofVerification(newTx, state));
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-vout-empty");
|
||||
BOOST_CHECK(state.GetRejectReason() == "bad-txns-no-sink-of-funds");
|
||||
|
||||
newTx.vJoinSplit.push_back(JSDescription());
|
||||
JSDescription *jsdesc = &newTx.vJoinSplit[0];
|
||||
|
|
Loading…
Reference in New Issue