Skip to content

Commit 55aa14e

Browse files
committed
fix: revert consensus error changes, fix tests instead
1 parent fde8ed1 commit 55aa14e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/test/txvalidation_tests.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
#include <boost/test/unit_test.hpp>
1616

1717

18+
struct TestChain100NoDIP0001Setup : public TestChain100Setup {
19+
TestChain100NoDIP0001Setup()
20+
: TestChain100Setup{{"-testactivationheight=dip0001@2000"}} {}
21+
};
22+
23+
1824
BOOST_AUTO_TEST_SUITE(txvalidation_tests)
1925

2026
/**
@@ -69,7 +75,7 @@ inline CTransactionRef create_placeholder_tx(size_t num_inputs, size_t num_outpu
6975
return MakeTransactionRef(mtx);
7076
}
7177

72-
BOOST_FIXTURE_TEST_CASE(package_tests, TestChain100Setup)
78+
BOOST_FIXTURE_TEST_CASE(package_tests, TestChain100NoDIP0001Setup)
7379
{
7480
LOCK(cs_main);
7581
unsigned int initialPoolSize = m_node.mempool->size();

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static bool ContextualCheckTransaction(const CTransaction& tx, TxValidationState
318318

319319
// Size limits
320320
if (fDIP0001Active_context && ::GetSerializeSize(tx, PROTOCOL_VERSION) > MAX_STANDARD_TX_SIZE)
321-
return state.Invalid(TxValidationResult::TX_CONSENSUS, "tx-size");
321+
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-txns-oversize");
322322

323323
return true;
324324
}

test/functional/mempool_accept.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
4141
def set_test_params(self):
4242
self.num_nodes = 1
4343
self.extra_args = [[
44-
'-txindex','-permitbaremultisig=0',
44+
'-txindex','-permitbaremultisig=0', '-testactivationheight=dip0001@2000',
4545
]] * self.num_nodes
4646
self.supports_cli = False
4747

0 commit comments

Comments
 (0)