From 98cbdb5a5c27d97c0953df7fed3025c3001a20a0 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 12 Sep 2022 08:32:08 +1000 Subject: [PATCH] Increment lock value Currently in one of the rustdoc examples showing lock satisfaction we use two locks with the same value, this obfuscates which lock is doing the satisfying and which lock is being satisfied. Increment the value in one of the locks so it is obvious which lock is which. --- bitcoin/src/blockdata/locktime/absolute.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/src/blockdata/locktime/absolute.rs b/bitcoin/src/blockdata/locktime/absolute.rs index 8543a808..5429badb 100644 --- a/bitcoin/src/blockdata/locktime/absolute.rs +++ b/bitcoin/src/blockdata/locktime/absolute.rs @@ -318,7 +318,7 @@ impl LockTime { /// ```rust /// # use bitcoin::absolute::{LockTime, LockTime::*}; /// # let n = LockTime::from_consensus(100); // n OP_CHECKLOCKTIMEVERIFY - /// # let lock_time = LockTime::from_consensus(100); // nLockTime + /// # let lock_time = LockTime::from_consensus(100 + 1); // nLockTime /// /// let is_satisfied = match (n, lock_time) { /// (Blocks(n), Blocks(lock_time)) => n <= lock_time,