From 26be9ddd27ad13828af35221c6f8c5a60f5e5823 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 8 Nov 2022 07:43:27 +1100 Subject: [PATCH] Make RBF rustdoc more scrary In order to really bring the security risks of RBF to peoples attention make the docs more scary. --- bitcoin/src/blockdata/transaction.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs index e8fed9bd..6272ff53 100644 --- a/bitcoin/src/blockdata/transaction.rs +++ b/bitcoin/src/blockdata/transaction.rs @@ -864,9 +864,13 @@ impl Transaction { /// Returns `true` if the transaction itself opted in to be BIP-125-replaceable (RBF). /// + /// # Warning + /// + /// **Incorrectly relying on RBF may lead to monetary loss!** + /// /// This **does not** cover the case where a transaction becomes replaceable due to ancestors - /// being RBF. Please note that transactions may be replaced even if they do not include the RBF - /// signal: . + /// being RBF. Please note that transactions **may be replaced** even if they **do not** include + /// the RBF signal: . pub fn is_explicitly_rbf(&self) -> bool { self.input.iter().any(|input| input.sequence.is_rbf()) }