diff options
author | glozow <gloriajzhao@gmail.com> | 2021-08-11 15:51:27 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2021-09-02 16:23:27 +0100 |
commit | 9c2f9f89846264b503d5573341bb78cf609cbc5e (patch) | |
tree | 80134146612422e568eb61bc4c53cbe67d187f43 /src/policy/rbf.h | |
parent | 3f033f01a6b0f7772ae1b21044903b8f4249ad08 (diff) | |
download | bitcoin-9c2f9f89846264b503d5573341bb78cf609cbc5e.tar.xz |
MOVEONLY: check that fees > direct conflicts to policy/rbf
Diffstat (limited to 'src/policy/rbf.h')
-rw-r--r-- | src/policy/rbf.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/policy/rbf.h b/src/policy/rbf.h index 6c4e218959..2c548152b5 100644 --- a/src/policy/rbf.h +++ b/src/policy/rbf.h @@ -69,4 +69,13 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx, const CTx std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& setAncestors, const std::set<uint256>& setConflicts, const uint256& txid); + +/** Check that the feerate of the replacement transaction(s) is higher than the feerate of each + * of the transactions in setIterConflicting. + * @param[in] setIterConflicting The set of mempool entries. + * @returns error message if fees insufficient, otherwise std::nullopt. + */ +std::optional<std::string> PaysMoreThanConflicts(const CTxMemPool::setEntries& setIterConflicting, + CFeeRate newFeeRate, const uint256& hash); + #endif // BITCOIN_POLICY_RBF_H |