public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp•com.au>
To: Mark Friedenbach <mark@friedenbach•org>
Cc: bitcoin-dev@lists•linuxfoundation.org
Subject: [bitcoin-dev] BIP 68 Questions
Date: Thu, 02 Jul 2015 12:08:58 +0930	[thread overview]
Message-ID: <873817s2pp.fsf@rustcorp.com.au> (raw)

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.


             reply	other threads:[~2015-07-02  2:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  2:38 Rusty Russell [this message]
2015-07-03  1:19 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873817s2pp.fsf@rustcorp.com.au \
    --to=rusty@rustcorp$(echo .)com.au \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=mark@friedenbach$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox