aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.h
Commit message (Collapse)AuthorAgeFilesLines
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Make CScript (and prevector) c++11 movable.Pieter Wuille2016-12-211-1/+0
| | | | | Such moves are used when reallocating vectors that contain them, for example.
* Move CTxInWitness inside CTxInPieter Wuille2016-12-041-0/+2
|
* Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFYBtcDrak2016-06-281-2/+2
|
* [RPC] signrawtransaction can sign P2WSHNicolasDorier2016-06-221-0/+1
|
* BIP141: Witness programPieter Wuille2016-06-221-0/+1
|
* BIP144: Serialization, hashes, relay (sender side)Pieter Wuille2016-06-221-0/+14
| | | | | | Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
* Merge #7907: Optimize and Cleanup CScript::FindAndDeleteWladimir J. van der Laan2016-05-051-3/+12
|\ | | | | | | | | | | | | d1d7775 Improve worst-case behavior of CScript::FindAndDelete (Patrick Strateman) e2a30bc Unit test for CScript::FindAndDelete (Gavin Andresen) c0f660c Replace c-style cast with c++ style static_cast. (Patrick Strateman) ec9ad5f Replace memcmp with std::equal in CScript::FindAndDelete (Patrick Strateman)
| * Improve worst-case behavior of CScript::FindAndDeletePatrick Strateman2016-04-211-2/+11
| | | | | | | | Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.
| * Replace c-style cast with c++ style static_cast.Patrick Strateman2016-04-191-1/+1
| |
| * Replace memcmp with std::equal in CScript::FindAndDeletePatrick Strateman2016-04-191-1/+1
| | | | | | | | Function is stl; std::equal just makes more sense.
* | Treat overly long scriptPubKeys as unspendablePieter Wuille2016-04-251-1/+1
| |
* | Introduce constant for maximum CScript lengthPieter Wuille2016-04-251-0/+3
|/
* BIP112: Implement CHECKSEQUENCEVERIFYMark Friedenbach2016-02-141-0/+12
| | | | | | | | | | - 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.
* Merge pull request #7205Wladimir J. van der Laan2016-01-051-1/+1
|\ | | | | | | | | | | fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
* | Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.mb300sd2015-12-151-2/+2
|/
* Prevector typePieter Wuille2015-11-131-5/+9
|
* script: Remove magic numbersDavid Hill2015-10-151-1/+8
| | | | | This adds two new constants, MAX_OPS_PER_SCRIPT and MAX_PUBKEYS_PER_MULTISIG.
* Accept any sequence of PUSHDATAs in OP_RETURN outputsPeter Todd2015-10-011-1/+0
| | | | | | | | | | | | Previously only one PUSHDATA was allowed, needlessly limiting applications such as matching OP_RETURN contents with bloom filters that operate on a per-PUSHDATA level. Now any combination that passes IsPushOnly() is allowed, so long as the total size of the scriptPubKey is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings) Also, this fixes the odd bug where previously the PUSHDATA could be replaced by any single opcode, even sigops consuming opcodes such as CHECKMULTISIG. (20 sigops!)
* Add IsPushOnly(const_iterator pc)Peter Todd2015-10-011-0/+1
| | | | | Allows IsPushOnly() to be applied to just part of the script for OP_RETURN outputs.
* Resolve issue 3166.mruddy2015-07-301-1/+0
| | | | | These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
* Separate core memory usage computation in core_memusage.hPieter Wuille2015-07-201-3/+0
|
* Implement accurate memory accounting for mempoolPieter Wuille2015-07-101-0/+3
|
* add CReserveScript to allow modular script keeping/returningJonas Schnelli2015-07-011-0/+9
| | | | - use one CReserveScript per mining thread
* Merge pull request #6124Wladimir J. van der Laan2015-06-261-3/+9
|\ | | | | | | | | | | | | ffd75ad Enable CHECKLOCKTIMEVERIFY as a standard script verify flag (Peter Todd) bc60b2b Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65) (Peter Todd) 48e9c57 Move LOCKTIME_THRESHOLD to src/script/script.h (Peter Todd) 99088d6 Make CScriptNum() take nMaxNumSize as an argument (Peter Todd)
| * Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)Peter Todd2015-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <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.
| * Move LOCKTIME_THRESHOLD to src/script/script.hPeter Todd2015-05-091-0/+4
| | | | | | | | Will now be needed by CHECKLOCKTIMEVERIFY code.
| * Make CScriptNum() take nMaxNumSize as an argumentPeter Todd2015-05-091-3/+4
| | | | | | | | | | While the existing numeric opcodes are all limited to 4-byte bignum arguments, new opcodes will need different limits.
* | fix header include groupsPhilip Kaufmann2015-05-141-1/+2
|/
* src/script/script.h: endian compatibility for PUSHDATA sizesWladimir J. van der Laan2015-03-061-7/+9
|
* Remove whitespaces before double colon in errors and logsPavel Janík2015-01-311-1/+1
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Make comments in /src/script doxygen compatibleMichael Ford2014-11-101-18/+26
|
* Fix all header definesPavel Janík2014-11-031-3/+3
|
* Improve CScriptNum() commentPeter Todd2014-10-251-2/+17
| | | | Edited-by: Pieter Wuille <[email protected]>
* Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)Pieter Wuille2014-10-251-7/+11
| | | | | Also use the new flag as a standard rule, and replace the IsCanonicalPush standardness check with it (as it is more complete).
* Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)Pieter Wuille2014-10-251-1/+1
|
* fix build with libc++ after 85c579eCory Fields2014-10-231-0/+1
|
* script: add a slew of includes all around and drop includes from script.hCory Fields2014-10-171-6/+6
| | | | Lots of files ended up with indirect includes from script.h.
* script: move ToString and ValueString out of the headerCory Fields2014-10-171-29/+1
|
* script: add ToByteVector() for converting anything with begin/endCory Fields2014-10-171-23/+6
| | | | This should move to a util header once their dependencies are cleaned up.
* script: move CScriptID to standard.h and add a ctor for creating them from ↵Cory Fields2014-10-171-6/+0
| | | | | | | | | | | | | | | | 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();
* Merge pull request #4969Wladimir J. van der Laan2014-09-251-1/+1
|\ | | | | | | cda45b5 Reinitializing list's begin iterator after few elements were erased from the head (ENikS)
| * Reinitializing list's begin iterator after few elements were erased from the ↵ENikS2014-09-231-1/+1
| | | | | | | | head
* | Fixing C4146 warningENikS2014-09-251-1/+1
|/ | | | Rebased-By: Wladimir J. van der Laan <[email protected]>
* Fixing condition 'sabotaging' MSVC buildENikS2014-09-191-2/+0
|
* Move CTxDestination from script/script to script/standardPieter Wuille2014-09-161-17/+0
|
* cleanup new script files (no code changes)Philip Kaufmann2014-09-141-3/+3
| | | | | | - add missing header end comments - ensure alphabetical ordering - update copyright year and license
* Move CScript class and dependencies to script/scriptjtimon2014-09-081-0/+645