aboutsummaryrefslogtreecommitdiff
path: root/src/test/transaction_tests.cpp
AgeCommit message (Collapse)Author
2017-03-07Merge #9555: [test] Avoid reading a potentially uninitialized variable in ↵MarcoFalke
tx_invalid-test (transaction_tests.cpp) 8455e36 [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (practicalswift) Tree-SHA512: 1064cdd5c9e4612a05397a5880535d93dbb18dec4897b4bbda9e6ad78d30f4c72303e4d23159398f1b33545ff5819e739e374d7cde757e402b26c355268a2319
2017-01-21[test] Avoid reading a potentially uninitialized variable in tx_invalid-testpracticalswift
Prior to this commit the err variable was not guaranteed to be set before the check ... BOOST_CHECK_MESSAGE(err != SCRIPT_ERR_OK, ScriptErrorString(err));
2017-01-16Merge #9380: Separate different uses of minimum feesWladimir J. van der Laan
eb30d1a Introduce -dustrelayfee (Alex Morcos) 7b1add3 Introduce -incrementalrelayfee (Alex Morcos) daec955 Introduce -blockmintxfee (Alex Morcos)
2017-01-16Introduce -dustrelayfeeAlex Morcos
2017-01-02Refactoring: Removed using namespace <xxx> from bench/ and test/ source files.Karl-Johan Alm
2016-12-04Move CTxInWitness inside CTxInPieter Wuille
2016-12-02Make CTransaction actually immutablePieter Wuille
2016-12-02Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo
2016-10-16Require compressed keys in segwit as policy and disable signing with ↵Johnson Lau
uncompressed keys for segwit scripts
2016-09-27Add policy: null signature for failed CHECK(MULTI)SIGJohnson Lau
2016-09-23Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHJohnson Lau
2016-08-26Rename to PrecomputedTransactionDataPieter Wuille
2016-08-16Unit test for sighash cachingNicolas DORIER
2016-08-16Precompute sighashesPieter Wuille
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
2016-06-22[qa] Add transaction tests for segwitNicolasDorier
Including BIP143 P2WSH examples by jl2012.
2016-06-22[qa] Witness version 0 signing unit testsPieter Wuille
2016-06-22Refactor script validation to observe amountsPieter Wuille
This is a preparation for BIP143 support.
2016-06-22BIP141: Witness programPieter Wuille
2016-06-22BIP144: Serialization, hashes, relay (sender side)Pieter Wuille
Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
2016-02-14BIP112: Implement CHECKSEQUENCEVERIFYMark Friedenbach
- 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.
2016-02-01Get rid of inaccurate ScriptSigArgsExpectedPieter Wuille
(cherry picked from commit 52b29dca7670c3f6d2ab918c0fff1d17c4e494ad)
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-11-09[trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000MarcoFalke
2015-11-09transaction_tests: Be more strict checking dustMarcoFalke
* Don't allow off-by-one or more * Make clear dust is coupled with minRelayTxFee * Check rounding for odd values
2015-10-10tests: update transaction_tests for new dust thresholdWladimir J. van der Laan
2015-10-01Accept any sequence of PUSHDATAs in OP_RETURN outputsPeter Todd
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!)
2015-10-01[Univalue] add univalue over subtreeJonas Schnelli
similar to secp256k1 include and compile univalue over a subtree
2015-07-23Includes: Cleanup around net main and walletJorge Timón
-Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
2015-07-23TRIVIAL: Missing includesJorge Timón
2015-06-26Policy: MOVEONLY: 3 functions to policy.o:Luke Dashjr
- [script/standard.o] IsStandard - [main.o] IsStandardTx - [main.o] AreInputsStandard Also, don't use namespace std in policy.cpp
2015-06-26Merge pull request #6124Wladimir J. van der Laan
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)
2015-06-21Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)Peter Todd
<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.
2015-06-04Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli
- implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
2015-06-04remove JSON Spirit UniValue wrapperJonas Schnelli
2015-06-04extend conversion to UniValueJonas Schnelli
2015-06-04Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik
2015-05-15Consensus: MOVEONLY: Move CValidationState from main consensus/validationjtimon
2015-03-12tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan
Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
2015-02-03Merge pull request #5286Wladimir J. van der Laan
44e9a6b Update the 'test_IsStandard' unit test (Flavien Charlon) a930658 Change the default maximum OP_RETURN size to 80 bytes (Flavien Charlon)
2015-02-02Avoid storing a reference passed to SignatureChecker constructorsPieter Wuille
2015-02-02Use separate SignatureChecker for CMutableTransactionPieter Wuille
2015-01-08Merge pull request #5143Wladimir J. van der Laan
da918ac Make SCRIPT_VERIFY_CLEANSTACK a standardness requirement (Pieter Wuille) b6e03cc Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6) (Pieter Wuille) ae4151b No semantic change: reuse stack variable in P2SH evaluation (Pieter Wuille)
2015-01-06Merge pull request #5513Wladimir J. van der Laan
856e862 namespace: drop most boost namespaces and a few header cleanups (Cory Fields) 9b1ab86 namespace: drop boost::assign altogether here (Cory Fields) a324199 namespace: remove boost namespace pollution (Cory Fields)
2015-01-05String conversions uint256 -> uint256SWladimir J. van der Laan
If uint256() constructor takes a string, uint256(0) will become dangerous when uint256 does not take integers anymore (it will go through std::string(const char*) making a NULL string, and the explicit keyword is no help).
2015-01-02namespace: drop most boost namespaces and a few header cleanupsCory Fields
A few boost::asio were left around because they're very wordy otherwise.
2014-12-16Remove references to X11 licenceMichael Ford
2014-11-25Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6)Pieter Wuille
Based on an earlier patch by Peter Todd, though the rules here are different (P2SH scripts should not have a CLEANSTACK check before the P2SH evaluation).
2014-11-17Discourage NOPs reserved for soft-fork upgradesPeter Todd
NOP1 to NOP10 are reserved for future soft-fork upgrades. In the event of an upgrade such NOPs have *VERIFY behavior, meaning that if their arguments are not correct the script fails. Discouraging these NOPs by rejecting transactions containing them from the mempool ensures that we'll never accept transactions, nor mine blocks, with scripts that are now invalid according to the majority of hashing power even if we're not yet upgraded. Previously this wasn't an issue as the IsStandard() rules didn't allow upgradable NOPs anyway, but 7f3b4e95 relaxed the IsStandard() rules for P2SH redemptions allowing any redeemScript to be spent. We *do* allow upgradable NOPs in scripts so long as they are not executed. This is harmless as there is no opportunity for the script to be invalid post-upgrade.
2014-11-16Update the 'test_IsStandard' unit testFlavien Charlon
The maximum length for the payload of an OP_RETURN output is now 80 bytes, and unit tests must be modified to account for the change.
2014-11-14script: check ScriptError values in script testsCory Fields