aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_standard_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace usage of GetScriptForWitness with GetScriptForDestinationMeshCollider2020-08-141-11/+6
|
* Make CHash256/CHash160 output to SpanPieter Wuille2020-07-301-1/+1
|
* Make CHash256 and CHash160 consume SpansPieter Wuille2020-07-301-1/+1
|
* scripted-diff: TxoutType C++11 scoped enum classMarcoFalke2020-06-211-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename TxoutType $1 rename_value() { sed -i "s/ TX_$1,/ $1,/g" src/script/standard.h; # First strip the prefix in the definition (header) rename_global TX_$1 "TxoutType::$1"; # Then replace globally } # Change the type globally to bring it in line with the style-guide # (clsses are UpperCamelCase) rename_global 'enum txnouttype' 'enum class TxoutType' rename_global 'txnouttype' 'TxoutType' # Now rename each enum value rename_value 'NONSTANDARD' rename_value 'PUBKEY' rename_value 'PUBKEYHASH' rename_value 'SCRIPTHASH' rename_value 'MULTISIG' rename_value 'NULL_DATA' rename_value 'WITNESS_V0_KEYHASH' rename_value 'WITNESS_V0_SCRIPTHASH' rename_value 'WITNESS_UNKNOWN' -END VERIFY SCRIPT-
* doc: Update outdated txnouttype documentationMarcoFalke2020-06-211-2/+2
| | | | | Also, remove scope of txnouttype in fuzz tests temporarily. The next commit will add scopes to all txnouttype.
* wallet: Fix typo in assert that is compile-time trueMarcoFalke2020-05-041-0/+6
|
* scripted-diff: test: Move setup_common to test libraryMarcoFalke2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
* Move various SigningProviders to signingprovider.{cpp,h}Andrew Chow2019-07-091-1/+1
| | | | | | | | | Moves all of the various SigningProviders out of sign.{cpp,h} and keystore.{cpp,h}. As such, keystore.{cpp,h} is also removed. Includes and the Makefile are updated to reflect this. Includes were largely changed using: git grep -l "keystore.h" | xargs sed -i -e 's;keystore.h;script/signingprovider.h;g'
* tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift2019-06-261-1/+0
| | | | unused includes in tests
* Move ismine to wallet moduleAndrew Chow2019-06-191-361/+0
|
* Replace CScriptID and CKeyID in CTxDestination with dedicated typesGregory Sanders2019-04-291-34/+34
|
* scripted-diff: Bump copyright headers in test, benchMarcoFalke2019-04-111-1/+1
| | | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
* scripted-diff: Rename test_bitcoin to test/setup_commonMarcoFalke2019-04-111-1/+1
| | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT-
* tests: Test for expected return values when calling functions returning a ↵practicalswift2018-12-131-47/+47
| | | | success code
* Merge #13429: Return the script type from SolverWladimir J. van der Laan2018-08-251-29/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 984d72ec659361d8c1a6f3c6864e839a807817a7 Return the script type from Solver (Ben Woosley) Pull request description: Because false is synonymous with TX_NONSTANDARD, this conveys the same information and makes the handling explicitly based on script type, simplifying each call site. Prior to this change it was common for the return value to be ignored, or for the return value and TX_NONSTANDARD to be redundantly handled. Tree-SHA512: 31864f856b8cb75f4b782d12678070e8b1cfe9665c6f57cfb25e7ac8bcea8a22f9a78d7c8cf0101c841f2a612400666fb91798bffe88de856e98b873703b0965
| * Return the script type from SolverBen Woosley2018-07-221-29/+18
| | | | | | | | | | | | | | | | | | Because false is synonymous with TX_NONSTANDARD, this conveys the same information and makes the handling explicitly based on script type, simplifying each call site. Prior to this change it was common for the return value to be ignored, or for the return value and TX_NONSTANDARD to be redundantly handled.
* | Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|/
* Add P2WSH destination helper and use it instead of manual hashingPieter Wuille2018-06-171-100/+29
|
* Add additional unit tests for invalid IsMine combinationsPieter Wuille2018-06-171-0/+82
|
* Do not expose invalidity from IsMinePieter Wuille2018-06-171-67/+33
|
* wallet: Prevent segfault when sending to unspendable witnessMarcoFalke2018-05-301-0/+26
|
* Do not treat bare multisig as IsMinePieter Wuille2018-04-191-1/+8
| | | | | | Such outputs can still be watched, and signed for, but they aren't treated as valid payments. That means they won't cause transactions to appear in listtransactions, their outputs to be shown under listunspent, or affect balances.
* test: Fix sign for expected valuesKarl-Johan Alm2018-04-111-12/+12
| | | | A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
* Implicitly know about P2WPKH redeemscriptsPieter Wuille2018-01-091-6/+1
| | | | | Make CKeyStore automatically known about the redeemscripts necessary for P2SH-P2WPKH (and due to the extra checks in IsMine, also P2WPKH) spending.
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Implement BIP173 addresses and testsPieter Wuille2017-09-281-19/+20
|
* [script] Unit tests for IsMineJim Posen2017-09-211-6/+361
| | | | Does not test watch-only addresses.
* [script] Unit tests for script/standard functionsJim Posen2017-09-211-0/+385