From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 57401305 for ; Thu, 2 Jul 2015 02:39:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BF905FB for ; Thu, 2 Jul 2015 02:39:12 +0000 (UTC) Received: by ozlabs.org (Postfix, from userid 1011) id 580AF14076E; Thu, 2 Jul 2015 12:39:09 +1000 (AEST) From: Rusty Russell To: Mark Friedenbach User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 02 Jul 2015 12:08:58 +0930 Message-ID: <873817s2pp.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: bitcoin-dev@lists.linuxfoundation.org Subject: [bitcoin-dev] BIP 68 Questions X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 02:39:13 -0000 Hi Mark, It looks like the code in BIP 68 compares the input's nSequence against the transaction's nLockTime: if ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD) nMinHeight = std::max(nMinHeight, (int)tx.nLockTime); else nMinTime = std::max(nMinTime, (int64_t)tx.nLockTime); if (nMinHeight >= nBlockHeight) return nMinHeight; if (nMinTime >= nBlockTime) return nMinTime; So if transaction B spends the output of transaction A: 1. If A is in the blockchain already, you don't need a relative locktime since you know A's time. 2. If it isn't, you can't create B since you don't know what value to set nLockTime to. How was this supposed to work? Thanks, Rusty.