mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
package rbf: cpfp structure requires package > parent feerate
This commit is contained in:
parent
ad7f1f697f
commit
3f00aae140
2 changed files with 2 additions and 2 deletions
|
@ -1201,7 +1201,7 @@ bool MemPoolAccept::PackageMempoolChecks(const std::vector<CTransactionRef>& txn
|
||||||
const CFeeRate package_feerate(m_subpackage.m_total_modified_fees, m_subpackage.m_total_vsize);
|
const CFeeRate package_feerate(m_subpackage.m_total_modified_fees, m_subpackage.m_total_vsize);
|
||||||
if (package_feerate <= parent_feerate) {
|
if (package_feerate <= parent_feerate) {
|
||||||
return package_state.Invalid(PackageValidationResult::PCKG_POLICY,
|
return package_state.Invalid(PackageValidationResult::PCKG_POLICY,
|
||||||
"package RBF failed: package feerate is less than parent feerate",
|
"package RBF failed: package feerate is less than or equal to parent feerate",
|
||||||
strprintf("package feerate %s <= parent feerate is %s", package_feerate.ToString(), parent_feerate.ToString()));
|
strprintf("package feerate %s <= parent feerate is %s", package_feerate.ToString(), parent_feerate.ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ class PackageRBFTest(BitcoinTestFramework):
|
||||||
self.assert_mempool_contents(expected=package_txns4)
|
self.assert_mempool_contents(expected=package_txns4)
|
||||||
package_hex5, package_txns5 = self.create_simple_package(coin, parent_fee=DEFAULT_CHILD_FEE, child_fee=DEFAULT_CHILD_FEE)
|
package_hex5, package_txns5 = self.create_simple_package(coin, parent_fee=DEFAULT_CHILD_FEE, child_fee=DEFAULT_CHILD_FEE)
|
||||||
pkg_results5 = node.submitpackage(package_hex5)
|
pkg_results5 = node.submitpackage(package_hex5)
|
||||||
assert 'package RBF failed: package feerate is less than parent feerate' in pkg_results5["package_msg"]
|
assert 'package RBF failed: package feerate is less than or equal to parent feerate' in pkg_results5["package_msg"]
|
||||||
self.assert_mempool_contents(expected=package_txns4)
|
self.assert_mempool_contents(expected=package_txns4)
|
||||||
|
|
||||||
package_hex5_1, package_txns5_1 = self.create_simple_package(coin, parent_fee=DEFAULT_CHILD_FEE, child_fee=DEFAULT_CHILD_FEE + Decimal("0.00000001"))
|
package_hex5_1, package_txns5_1 = self.create_simple_package(coin, parent_fee=DEFAULT_CHILD_FEE, child_fee=DEFAULT_CHILD_FEE + Decimal("0.00000001"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue