aboutsummaryrefslogtreecommitdiff
path: root/src/test/transaction_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* really s/Doge/Dis/g this timeTomo Ueda2021-09-021-1/+1
|
* tests: fix non-qt tests that spend dustPatrick Lodder2020-07-221-1/+1
| | | | | | | | - transaction_tests/IsStandard was spending 0.9 DOGE - tx_validationcache_tests/mempool_dblspend was spending 0.11 DOGE - wallet_tests/coin_selection was completely built around spending cents. This test has been completely reworked and redocumented to make sense for Dogecoin
* Update or eliminate remaining tests (#1483)Ross Nicoll2018-09-191-2/+3
| | | | | * Change amount tests to use rounded values * Disable legacy tests
* Merge #9380: Separate different uses of minimum feesWladimir J. van der Laan2017-01-161-3/+3
|\ | | | | | | | | | | eb30d1a Introduce -dustrelayfee (Alex Morcos) 7b1add3 Introduce -incrementalrelayfee (Alex Morcos) daec955 Introduce -blockmintxfee (Alex Morcos)
| * Introduce -dustrelayfeeAlex Morcos2017-01-161-3/+3
| |
* | Refactoring: Removed using namespace <xxx> from bench/ and test/ source files.Karl-Johan Alm2017-01-021-41/+39
|/
* Move CTxInWitness inside CTxInPieter Wuille2016-12-041-13/+4
|
* Make CTransaction actually immutablePieter Wuille2016-12-021-26/+24
|
* Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-1/+1
|
* Require compressed keys in segwit as policy and disable signing with ↵Johnson Lau2016-10-161-26/+10
| | | | uncompressed keys for segwit scripts
* Add policy: null signature for failed CHECK(MULTI)SIGJohnson Lau2016-09-271-0/+1
|
* Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHJohnson Lau2016-09-231-0/+1
|
* Rename to PrecomputedTransactionDataPieter Wuille2016-08-261-6/+6
|
* Unit test for sighash cachingNicolas DORIER2016-08-161-0/+81
|
* Precompute sighashesPieter Wuille2016-08-161-2/+4
| | | | Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
* [qa] Add transaction tests for segwitNicolasDorier2016-06-221-10/+30
| | | | Including BIP143 P2WSH examples by jl2012.
* [qa] Witness version 0 signing unit testsPieter Wuille2016-06-221-0/+276
|
* Refactor script validation to observe amountsPieter Wuille2016-06-221-2/+4
| | | | This is a preparation for BIP143 support.
* BIP141: Witness programPieter Wuille2016-06-221-2/+2
|
* BIP144: Serialization, hashes, relay (sender side)Pieter Wuille2016-06-221-1/+1
| | | | | | Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
* BIP112: Implement CHECKSEQUENCEVERIFYMark Friedenbach2016-02-141-1/+2
| | | | | | | | | | - 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.
* Get rid of inaccurate ScriptSigArgsExpectedPieter Wuille2016-02-011-8/+0
| | | | (cherry picked from commit 52b29dca7670c3f6d2ab918c0fff1d17c4e494ad)
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000MarcoFalke2015-11-091-1/+1
|
* transaction_tests: Be more strict checking dustMarcoFalke2015-11-091-2/+17
| | | | | | * Don't allow off-by-one or more * Make clear dust is coupled with minRelayTxFee * Check rounding for odd values
* tests: update transaction_tests for new dust thresholdWladimir J. van der Laan2015-10-101-1/+1
|
* Accept any sequence of PUSHDATAs in OP_RETURN outputsPeter Todd2015-10-011-2/+19
| | | | | | | | | | | | 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!)
* [Univalue] add univalue over subtreeJonas Schnelli2015-10-011-1/+1
| | | | similar to secp256k1 include and compile univalue over a subtree
* Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+1
| | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* TRIVIAL: Missing includesJorge Timón2015-07-231-0/+1
|
* Policy: MOVEONLY: 3 functions to policy.o:Luke Dashjr2015-06-261-0/+1
| | | | | | | | - [script/standard.o] IsStandard - [main.o] IsStandardTx - [main.o] AreInputsStandard Also, don't use namespace std in policy.cpp
* Merge pull request #6124Wladimir J. van der Laan2015-06-261-1/+2
|\ | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <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.
* | Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli2015-06-041-20/+3
| | | | | | | | | | | | - implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
* | remove JSON Spirit UniValue wrapperJonas Schnelli2015-06-041-9/+9
| |
* | extend conversion to UniValueJonas Schnelli2015-06-041-0/+1
| |
* | Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik2015-06-041-9/+24
| |
* | Consensus: MOVEONLY: Move CValidationState from main consensus/validationjtimon2015-05-151-1/+2
|/
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | 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.
* Merge pull request #5286Wladimir J. van der Laan2015-02-031-4/+4
|\ | | | | | | | | 44e9a6b Update the 'test_IsStandard' unit test (Flavien Charlon) a930658 Change the default maximum OP_RETURN size to 80 bytes (Flavien Charlon)
| * Update the 'test_IsStandard' unit testFlavien Charlon2014-11-161-4/+4
| | | | | | | | | | 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.
* | Avoid storing a reference passed to SignatureChecker constructorsPieter Wuille2015-02-021-2/+2
| |
* | Use separate SignatureChecker for CMutableTransactionPieter Wuille2015-02-021-2/+2
| |
* | Merge pull request #5143Wladimir J. van der Laan2015-01-081-1/+2
|\ \ | | | | | | | | | | | | | | | 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)
| * | Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6)Pieter Wuille2014-11-251-1/+2
| | | | | | | | | | | | | | | 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).
* | | Merge pull request #5513Wladimir J. van der Laan2015-01-061-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | 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)
| * | | namespace: drop most boost namespaces and a few header cleanupsCory Fields2015-01-021-2/+1
| | | | | | | | | | | | | | | | A few boost::asio were left around because they're very wordy otherwise.
* | | | String conversions uint256 -> uint256SWladimir J. van der Laan2015-01-051-2/+2
|/ / / | | | | | | | | | | | | | | | | | | 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).
* / / Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|/ /
* | Discourage NOPs reserved for soft-fork upgradesPeter Todd2014-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.