aboutsummaryrefslogtreecommitdiff
path: root/src/test/txpackage_tests.cpp
AgeCommit message (Collapse)Author
2023-04-17[policy] disallow transactions under min relay fee, even in packagesglozow
Avoid adding transactions below min relay feerate because, even if they were bumped through CPFP when entering the mempool, we do not have a DoS-resistant way of ensuring they always remain bumped. In the future, this rule can be relaxed (e.g. to allow packages to bump 0-fee transactions) if we find a way to do so.
2023-04-17[test] package cpfp bumps parents <mempoolminfee but >=minrelaytxfeeglozow
2023-02-06Move random test util code from setup_common to randomJon Atack
as many of the unit tests don't use this code
2023-01-10[validation] return MempoolAcceptResult for every tx on PCKG_TX failureglozow
This makes the interface more predictable and useful. The caller understands one or more transactions failed, and can learn what happened with each transaction. We already have this information, so we might as well return it. It doesn't make sense to do this for other PackageValidationResult values because: - PCKG_RESULT_UNSET: this means everything succeeded, so the individual failures are no longer accurate. - PCKG_MEMPOOL_ERROR: something went wrong with the mempool logic; transaction failures might not be meaningful. - PCKG_POLICY: this means something was wrong with the package as a whole. The caller should use the PackageValidationState to find the error, rather than looking at individual MempoolAcceptResults.
2023-01-10[validation] remove PackageMempoolAcceptResult::m_package_feerateglozow
This value creates an extremely confusing interface as its existence is dependent upon implementation details (whether something was submitted on its own, etc). MempoolAcceptResult::m_effective_feerate is much more helpful, as it always exists for submitted transactions.
2023-01-10[validation] return wtxids of other transactions whose fees were usedglozow
2023-01-06[validation] return effective feerate from mempool validationglozow
2023-01-06[test] package validation quits early due to non-policy, non-missing-inputs ↵glozow
failure
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-04-07refactor: fixup named args in txpackage testsfanquake
Regression in #24152.
2022-04-05[unit test] package feerate and package cpfpglozow
2022-03-31test: fix incorrect named args in txpackage testsfanquake
2022-02-14[validation] look up transaction by txidglozow
GetIter takes a txid, not wtxid.
2022-01-17[unit test] package parents are a mixglozow
2022-01-17[unit test] different witness in package submissionglozow
If/when witness replacement is implemented in the future, this test case can be easily replaced with witness replacement tests.
2021-12-15Merge bitcoin/bitcoin#22674: validation: mempool validation and submission ↵W. J. van der Laan
for packages of 1 child + parents 046e8ff264be6b888c0f9a9d822e32aa74e19b78 [unit test] package submission (glozow) e12fafda2dfbbdf63f125e5af797ecfaa6488f66 [validation] de-duplicate package transactions already in mempool (glozow) 8310d942e046c5a9b6bd90afdcd3af68dd91e081 [packages] add sanity checks for package vs mempool limits (glozow) be3ff151a1f9665720cdf70d072b098a2f9726a9 [validation] full package accept + mempool submission (glozow) 144a29099a865ac1dc3e5291d9529fbcca9c83a4 [policy] require submitted packages to be child-with-unconfirmed-parents (glozow) d59ddc5c3d1c035474d7bc9fa9f8a0eeb1c8498c [packages/doc] define and document package rules (glozow) ba26169f6035c238378a3c9647213328a006fa23 [unit test] context-free package checks (glozow) 9b2fdca7f03911ac40fe0f8a0b5da534bee4554b [packages] add static IsChildWithParents function (glozow) Pull request description: This is 1 chunk of [Package Mempool Accept](https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a); it restricts packages to 1 child with its parents, doesn't allow conflicts, and doesn't have CPFP (yet). Future PRs (see #22290) will add RBF and CPFP within packages. ACKs for top commit: laanwj: Code review ACK 046e8ff264be6b888c0f9a9d822e32aa74e19b78 Tree-SHA512: 37dbba37d527712f8efef71ee05c90a8308992615af35f5e0cfeafc60d859cc792737d125aac526e37742fe7683ac8c155ac24af562426213904333c01260c95
2021-11-29[unit test] package submissionglozow
2021-11-29[unit test] context-free package checksglozow
2021-11-19scripted-diff: Use clang-tidy syntax for C++ named argumentsMarcoFalke
-BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's:((\(|\{|,)(\n| )*)\/\* ?([^=* ]+) ?\*\/ ?:\1/*\4=*/:g' $( git ls-files ./src/test ./src/wallet/test ) -END VERIFY SCRIPT-
2021-11-17doc: Fix incorrect C++ named argsMarcoFalke
2021-11-04[test] call CheckPackage for package sanitization checksglozow
Makes the test more minimal. We're just trying to test that our package sanitization logic is correct. Now that this code lives in its own function (rather than inside of AcceptMultipleTransactions), there's no need to call ProcessNewPackage to test this.
2021-11-04MOVEONLY: move package unit tests to their own fileglozow