mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
RPC: Add maxfeerate and maxburnamount args to submitpackage
And thread the feerate value through ProcessNewPackage to reject individual transactions that exceed the given feerate. This allows subpackage processing, and is compatible with future package RBF work.
This commit is contained in:
@@ -274,13 +274,15 @@ MempoolAcceptResult AcceptToMemoryPool(Chainstate& active_chainstate, const CTra
|
||||
/**
|
||||
* Validate (and maybe submit) a package to the mempool. See doc/policy/packages.md for full details
|
||||
* on package validation rules.
|
||||
* @param[in] test_accept When true, run validation checks but don't submit to mempool.
|
||||
* @param[in] test_accept When true, run validation checks but don't submit to mempool.
|
||||
* @param[in] max_sane_feerate If exceeded by an individual transaction, rest of (sub)package evalution is aborted.
|
||||
* Only for sanity checks against local submission of transactions.
|
||||
* @returns a PackageMempoolAcceptResult which includes a MempoolAcceptResult for each transaction.
|
||||
* If a transaction fails, validation will exit early and some results may be missing. It is also
|
||||
* possible for the package to be partially submitted.
|
||||
*/
|
||||
PackageMempoolAcceptResult ProcessNewPackage(Chainstate& active_chainstate, CTxMemPool& pool,
|
||||
const Package& txns, bool test_accept)
|
||||
const Package& txns, bool test_accept, std::optional<CFeeRate> max_sane_feerate)
|
||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
/* Mempool validation helper functions */
|
||||
|
||||
Reference in New Issue
Block a user