aboutsummaryrefslogtreecommitdiff
path: root/src/policy/rbf.h
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2021-08-03 13:13:43 +0100
committerglozow <gloriajzhao@gmail.com>2021-09-02 16:23:26 +0100
commit7b60c02b7d5e2ab12288393d2258873ebb26d811 (patch)
tree3ede75858f8f52b94a2dfeef45806b100e23d93d /src/policy/rbf.h
parentf8ad2a57c61d1e817e2445226688e03080fc8688 (diff)
downloadbitcoin-7b60c02b7d5e2ab12288393d2258873ebb26d811.tar.xz
MOVEONLY: BIP125 Rule 2 to policy/rbf
Diffstat (limited to 'src/policy/rbf.h')
-rw-r--r--src/policy/rbf.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/policy/rbf.h b/src/policy/rbf.h
index 2a41ca8892..0f9a3d9856 100644
--- a/src/policy/rbf.h
+++ b/src/policy/rbf.h
@@ -49,4 +49,11 @@ std::optional<std::string> GetEntriesForConflicts(const CTransaction& tx, CTxMem
const CTxMemPool::setEntries& setIterConflicting,
CTxMemPool::setEntries& allConflicting)
EXCLUSIVE_LOCKS_REQUIRED(m_pool.cs);
+
+/** BIP125 Rule #2: "The replacement transaction may only include an unconfirmed input if that input
+ * was included in one of the original transactions."
+ * @returns error message if Rule #2 is broken, otherwise std::nullopt. */
+std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx, const CTxMemPool& m_pool,
+ const CTxMemPool::setEntries& setIterConflicting)
+ EXCLUSIVE_LOCKS_REQUIRED(m_pool.cs);
#endif // BITCOIN_POLICY_RBF_H