Permalink
Commits on Jul 11, 2017
  1. Replace MAX_OPCODE for OP_NOP10.

    That OP_NOP10 is the last executable opcode is a bit of a obscure trivia, and the MAX_OPCODE constant already exists. This merely standardizes use of MAX_OPCODE over OP_NOP10 where it makes sense and is more clear.
    maaku committed Jul 11, 2017
Commits on Feb 14, 2016
  1. BIP112: Implement CHECKSEQUENCEVERIFY

    - Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112)
      <nSequence> CHECKSEQUENCEVERIFY -> <nSequence>
    - Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block.
    - Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence()
    - Add bitwise AND operator to CScriptNum
    - Enable CHECKSEQUENCEVERIFY as a standard script verify flag
    - Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use.
    maaku committed with btcdrak Sep 25, 2015
Commits on Oct 23, 2015
  1. Enable policy enforcing GetMedianTimePast as the end point of lock-ti…

    …me constraints
    
    Transactions are not allowed in the memory pool or selected for inclusion in a block until their lock times exceed chainActive.Tip()->GetMedianTimePast(). However blocks including transactions which are only mature under the old rules are still accepted; this is *not* the soft-fork required to actually rely on the new constraint in production.
    maaku committed Jun 3, 2015
  2. Add rules--presently disabled--for using GetMedianTimePast as endpoin…

    …t for lock-time calculations
    
    The lock-time code currently uses CBlock::nTime as the cutoff point for time based locked transactions. This has the unfortunate outcome of creating a perverse incentive for miners to lie about the time of a block in order to collect more fees by including transactions that by wall clock determination have not yet matured. By using CBlockIndex::GetMedianTimePast from the prior block instead, the self-interested miner no longer gains from generating blocks with fraudulent timestamps. Users can compensate for this change by simply adding an hour (3600 seconds) to their time-based lock times.
    
    If enforced, this would be a soft-fork change. This commit only adds the functionality on an unexecuted code path, without changing the behaviour of Bitcoin Core.
    maaku committed Jun 3, 2015
Commits on Aug 11, 2015
  1. Fix spelling mistake in -> if.

    maaku committed Aug 11, 2015
  2. Correct a possibly intentional pun that is nevertheless hard to read:…

    … "two times of nLockTime." What is meant is that there are two kinds, or categories of nLockTime.
    maaku committed Aug 11, 2015
Commits on Jun 2, 2015
  1. Explicitly set tx.nVersion for the genesis block and mining tests

    If/when CTransaction::CURRENT_VERSION is incremented, this will break CChainParams and the miner tests. This fix sets the transaction version explicitly where we depend on the hash value (genesis block, proof of work checks).
    maaku committed Jun 2, 2015
Commits on May 27, 2015
  1. Prevent block.nTime from decreasing

    Under some circumstances it is possible for there to be a significant,
    discontinuous jump in a node's clock value. On mining nodes, this can
    result in block templates which are no longer valid due to time-based
    nLockTime constraints. UpdateTime() is modified so that it will never
    decrease a block's nLockTime, thereby preventing such invalidations.
    maaku committed May 22, 2015
Commits on Sep 26, 2014
  1. Use a typedef for monetary values

    maaku committed with Mark Friedenbach Apr 22, 2014
Commits on Mar 8, 2014
  1. Minor code cleanup: remove indentation

    This indentation should have been stripped out when AreInputsStandard was made a top-level function instead of a CTransaction method.
    maaku committed Mar 7, 2014
Commits on Jul 27, 2013
  1. Fix typo in README.md

    maaku committed Jul 27, 2013