Patrick Strateman
2bcf063b1d
Replace c-style cast with c++ style static_cast.
2017-01-09 11:23:23 +00:00
Patrick Strateman
8c95901609
Replace memcmp with std::equal in CScript::FindAndDelete
...
Function is stl; std::equal just makes more sense.
2017-01-09 11:23:17 +00:00
Peter Todd
bbcf66536f
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
2015-11-28 23:50:33 +00:00
Peter Todd
f1bba85b5b
Move LOCKTIME_THRESHOLD to src/script/script.h
...
Will now be needed by CHECKLOCKTIMEVERIFY code.
Rebased-From: 48e9c57cf06352f890eac4285ae022d8746cf3fd
2015-11-28 23:50:29 +00:00
Peter Todd
46a66cf870
Make CScriptNum() take nMaxNumSize as an argument
...
While the existing numeric opcodes are all limited to 4-byte bignum
arguments, new opcodes will need different limits.
Rebased-From: 99088d60d8a7747c6d1a7fd5d8cd388be1b3e138
2015-11-28 23:50:22 +00:00
Michael Ford
b9a36b15bf
Make comments in /src/script doxygen compatible
2014-11-10 14:51:55 +08:00
Pavel Janík
84738627ce
Fix all header defines
2014-11-03 16:16:40 +01:00
Peter Todd
6004e77b92
Improve CScriptNum() comment
...
Edited-by: Pieter Wuille <pieter.wuille@gmail.com>
2014-10-25 03:03:20 -07:00
Pieter Wuille
698c6abb25
Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)
...
Also use the new flag as a standard rule, and replace the IsCanonicalPush
standardness check with it (as it is more complete).
2014-10-25 03:03:20 -07:00
Pieter Wuille
d752ba86c1
Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)
2014-10-25 03:03:16 -07:00
Cory Fields
3a757c5294
fix build with libc++ after 85c579e
2014-10-23 14:24:22 -04:00
Cory Fields
85c579e3a6
script: add a slew of includes all around and drop includes from script.h
...
Lots of files ended up with indirect includes from script.h.
2014-10-17 13:44:57 -04:00
Cory Fields
db8eb54bd7
script: move ToString and ValueString out of the header
2014-10-17 13:44:14 -04:00
Cory Fields
e9ca4280f3
script: add ToByteVector() for converting anything with begin/end
...
This should move to a util header once their dependencies are cleaned up.
2014-10-17 13:44:14 -04:00
Cory Fields
066e2a1403
script: move CScriptID to standard.h and add a ctor for creating them from CScripts
...
This allows for a reversal of the current behavior.
This:
CScript foo;
CScriptID bar(foo.GetID());
Becomes:
CScript foo;
CScriptID bar(foo);
This way, CScript is no longer dependent on CScriptID or Hash();
2014-10-17 13:44:14 -04:00
Wladimir J. van der Laan
4b2b78b9f2
Merge pull request #4969
...
cda45b5 Reinitializing list's begin iterator after few elements were erased from the head (ENikS)
2014-09-25 15:58:56 +02:00
ENikS
1e73504865
Fixing C4146 warning
...
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-09-25 15:24:36 +02:00
ENikS
cda45b5131
Reinitializing list's begin iterator after few elements were erased from the head
2014-09-23 18:33:16 -04:00
ENikS
6134b43ba9
Fixing condition 'sabotaging' MSVC build
2014-09-19 18:29:58 -04:00
Pieter Wuille
0be990ba34
Move CTxDestination from script/script to script/standard
2014-09-16 19:14:32 +02:00
Philip Kaufmann
2d79bba36b
cleanup new script files (no code changes)
...
- add missing header end comments
- ensure alphabetical ordering
- update copyright year and license
2014-09-14 12:25:38 +02:00
jtimon
cbd22a50c4
Move CScript class and dependencies to script/script
2014-09-08 20:19:31 +02:00