diff options
author | Peter Todd <pete@petertodd.org> | 2014-09-29 03:44:25 -0400 |
---|---|---|
committer | Peter Todd <pete@petertodd.org> | 2015-10-08 17:39:17 +0200 |
commit | 6d0132520c6944a2f9f0d571e88d7fd57f805c38 (patch) | |
tree | ea3a680e1167a5d05fec040d4a12482e09a1a298 /src/script/script_error.h | |
parent | 750d54f9510d784c2a502089754241986fb1338a (diff) |
Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)
<nLockTime> CHECKLOCKTIMEVERIFY -> <nLockTime>
Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be
locked until some block height or block time in the future is reached.
Only the logic and unittests are implemented; this commit does not have
any actual soft-fork logic in it.
Thanks to Pieter Wuille for rebase.
Credit goes to Gregory Maxwell for the suggestion of comparing the
argument against the transaction nLockTime rather than the current
time/blockheight directly.
Rebased-From: bc60b2b4b401f0adff5b8b9678903ff8feb5867b
Diffstat (limited to 'src/script/script_error.h')
-rw-r--r-- | src/script/script_error.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/script_error.h b/src/script/script_error.h index 091524f35c..7b4c40edaa 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -35,6 +35,10 @@ typedef enum ScriptError_t SCRIPT_ERR_INVALID_ALTSTACK_OPERATION, SCRIPT_ERR_UNBALANCED_CONDITIONAL, + /* OP_CHECKLOCKTIMEVERIFY */ + SCRIPT_ERR_NEGATIVE_LOCKTIME, + SCRIPT_ERR_UNSATISFIED_LOCKTIME, + /* BIP62 */ SCRIPT_ERR_SIG_HASHTYPE, SCRIPT_ERR_SIG_DER, |