aboutsummaryrefslogtreecommitdiff
path: root/src/test/transaction_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Only relay Taproot spends if next block has it activePieter Wuille2020-10-301-1/+1
|
* tests: add generic qa-asset-based script verification unit testPieter Wuille2020-10-121-0/+1
| | | | | | | This adds a unit test that does generic script verification tests, with positive/negative witnesses/scriptsigs, under various flags. The test data is large (several MB) so it's stored in the qa-assets repo.
* Merge #16841: Replace GetScriptForWitness with GetScriptForDestinationfanquake2020-08-151-19/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7966aa424a8b78983f73742cbdb3d11eccaf9f3a Add variables for repeated scripts (MeshCollider) fec8336ad97dc717ea123f84ecfc10d9ee4a11db Remove GetScriptForWitness function (MeshCollider) b887060d06290abf4983a487f8da6b0986b058ab Replace usage of GetScriptForWitness with GetScriptForDestination (MeshCollider) Pull request description: As per this TODO in the code: > TODO: replace calls to GetScriptForWitness with GetScriptForDestination using the various witness-specific CTxDestination subtypes. The commit "Add additional check for P2SH before adding extra wrapper" also adds an additional check that the scriptPubKey is a P2SH before auto-wrapping the witness script. We shouldn't wrap the witness script if not. Note: #16251 is even better than this check, please review that. ACKs for top commit: instagibbs: ACK https://github.com/bitcoin/bitcoin/pull/16841/commits/7966aa424a8b78983f73742cbdb3d11eccaf9f3a jonatack: Code review re-ACK 7966aa4 per `git range-diff b4d0366 ed266f7 7966aa4` achow101: re-ACK 7966aa424a8b78983f73742cbdb3d11eccaf9f3a only changes since last is rebase. Tree-SHA512: 3449e0e83bd842acc7c94544a85367da97ac20d859eefc1a618caef0c98204398c266fe8fb9600b78326df5175402e1ae4a132eb766e2c4485e7cda6a2a95c43
| * Add variables for repeated scriptsMeshCollider2020-08-141-19/+25
| |
| * Replace usage of GetScriptForWitness with GetScriptForDestinationMeshCollider2020-08-141-19/+19
| |
* | Do not turn OP_1NEGATE in scriptSig into 0x0181 in signing codePieter Wuille2020-07-151-0/+2
|/ | | | Co-authored-by: Samuel Dobson <[email protected]>
* scripted-diff: TxoutType C++11 scoped enum classMarcoFalke2020-06-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* Remove CCoinsViewCache::GetValueIn(...)practicalswift2020-05-031-1/+0
|
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* scripted-diff: Sort test includesMarcoFalke2020-04-161-4/+4
| | | | | | | | | -BEGIN VERIFY SCRIPT- # Mark all lines with #includes sed -i --regexp-extended -e 's/(#include <.*>)/\1 /g' $(git grep -l '#include' ./src/bench/ ./src/test ./src/wallet/test/) # Sort all marked lines git diff -U0 | ./contrib/devtools/clang-format-diff.py -p1 -i -v -END VERIFY SCRIPT-
* Merge #17720: test: add unit test for non-standard "scriptsig-not-pushonly" txsMarcoFalke2020-03-241-0/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5aab011805ceb12801644170700b1a62e0bf4a5d test: add unit test for non-standard "scriptsig-not-pushonly" txs (Sebastian Falbesoner) Pull request description: Approaches another missing unit test of issue #17394: Checks that the function `IsStandardTx()` returns rejection reason "scriptsig-not-pushonly" if any one of the input's scriptSig consists of any other ops than just PUSHs. ACKs for top commit: MarcoFalke: ACK 5aab011805ceb12801644170700b1a62e0bf4a5d 🍟 practicalswift: ACK 5aab011805ceb12801644170700b1a62e0bf4a5d -- patch looks correct Tree-SHA512: fbe25bcf57e5f0c8d2397eb67e61fe8d9145ba83032789adb2b67d6fcbcd87e6427e9d965e8cd7bbaaea482e39ec2f110f71ef2de079c7d1fba2712848caa9ba
| * test: add unit test for non-standard "scriptsig-not-pushonly" txsSebastian Falbesoner2020-02-281-0/+34
| | | | | | | | | | | | The function IsStandardTx() returns rejection reason "scriptsig-not-pushonly" if the transaction has at least one input for which the scriptSig consists of any other ops than just PUSHs.
* | Merge #18173: refactor: test/bench: deduplicate SetupDummyInputs()MarcoFalke2020-02-291-40/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 7bf4ce4f644bb7dac9b63172c656b5d599eedea3 refactor: test/bench: dedup SetupDummyInputs() (Sebastian Falbesoner) Pull request description: The only difference between `SetupDummyInputs()` in `test/transaction_tests.cpp` and the one in `bench/ccoins_caching.cpp` was the nValue amounts of the outputs, so we allow to pass those in an extra (fixed-size) array parameter. ACKs for top commit: MarcoFalke: re-ACK 7bf4ce4f64, only change is schuffling includes 🚶 Empact: ACK https://github.com/bitcoin/bitcoin/pull/18173/commits/7bf4ce4f644bb7dac9b63172c656b5d599eedea3 Tree-SHA512: e13643b2470f6b6ab429da0c0a8eebd4cb41e2ff2e421ef36f85fa4847bf4ea8aab88d59a01e94cac4c4eb85edb561463f02215b174c50b573ac6bbcc2bf98a3
| * refactor: test/bench: dedup SetupDummyInputs()Sebastian Falbesoner2020-02-281-40/+5
| | | | | | | | | | | | The only difference between SetupDummyInputs() in test/transaction_tests.cpp and the one in bench/ccoins_caching.cpp was the nValue amounts of the outputs, so we allow to pass those in an extra (fixed-size) array parameter.
* | test: Tabs to spaces in all testsMarcoFalke2020-02-191-8/+6
|/ | | | Spaces are used in all of the source code except in these two instances
* Merge #17947: test: add unit test for non-standard txs with too large tx sizeWladimir J. van der Laan2020-02-101-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4537ba5f21ad8afb705325cd8e15dd43877eb28f test: add unit test for non-standard txs with too large tx size (Sebastian Falbesoner) Pull request description: Approaches another missing unit test of issue #17394: Checks that the function `IsStandardTx()` returns rejection reason `"tx-size"` if the transaction weight is larger than `MAX_STANDARD_TX_WEIGHT` (=400000 vbytes). ACKs for top commit: Empact: Code Review ACK https://github.com/bitcoin/bitcoin/pull/17947/commits/4537ba5f21ad8afb705325cd8e15dd43877eb28f instagibbs: ACK https://github.com/bitcoin/bitcoin/commit/4537ba5f21ad8afb705325cd8e15dd43877eb28f Tree-SHA512: ab32e3e47e0b337253aef3da9b7c97d01f4130d00d5860588dfed02114eec3ba49473acc6419448affd63e883fd827bf308716965606eaddee242c4c5a4eb799
| * test: add unit test for non-standard txs with too large tx sizeSebastian Falbesoner2020-01-161-0/+20
| | | | | | | | | | The function IsStandardTx() returns rejection reason "tx-size" if the transaction weight is larger than MAX_STANDARD_TX_WEIGHT (=400000 vbytes).
* | tests: reset fIsBareMultisigStd after bare-multisig testsfanquake2020-01-301-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | The bug this fixes is two-part. 1.The fIsBareMultisigStd global is being reused by other tests, i.e script_p2sh_tests(set), after being set to false. 2. The order our tests run in doesn't always? seem to be random, which meant that the script_p2sh tests would only fail if they were run in an order where transaction_tests ran first, mutating the fIsBareMultisigStd global. This doesn't seem to happen when running make check, but if you run src/test/test_bitcoin and pass --random=99999, the failure in script_p2sh: test/script_p2sh_tests.cpp:200: error: in "script_p2sh_tests/set": txTo[1].IsStandard will occur (on most systems). The new test was introduced in 1bb5d517aa616c1d5b5801d2ea36a2de5fb61eba.
* Merge #17502: test: add unit test for non-standard bare multisig txsMarcoFalke2019-12-101-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 1bb5d517aa616c1d5b5801d2ea36a2de5fb61eba test: add unit test for non-standard bare multisig txs (Sebastian Falbesoner) Pull request description: Approaches another missing unit test of issue #17394: Checks that the function `IsStandardTx()` returns rejection reason `"bare-multisig"` if any one of the outputs' scriptPubKey has bare multisignature format (i.e. `M <PubKey1> <PubKey2> ... <PubKeyN> N OP_CHECKSIG`, not P2SH!) and the policy flag `fIsBareMultisigStd` is set to false. ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/17502/commits/1bb5d517aa616c1d5b5801d2ea36a2de5fb61eba Tree-SHA512: d7c95e35da16520d6dcd2b4278e2426fedd13f68d1f23c90e85e929774e123fbfcfbccc26df6ad1c0dd61780896fa4b4b3d4e8280c647bb06df2bfcf2ba572fb
| * test: add unit test for non-standard bare multisig txsSebastian Falbesoner2019-11-211-0/+11
| | | | | | | | | | | | | | The function IsStandardTx() returns rejection reason "bare-multisig" if the transaction has a bare multisig output and the policy flag fIsBareMultisigStd is false (set by the boolean command-line argument "-permitbaremultisig" -- for the unit test, we simply set the global flag variable directly).
* | test: add unit test for non-standard txs with wrong nVersionDominik Spicher2019-11-211-0/+23
|/
* test: add unit test for non-standard txs with too large scriptSigSebastian Falbesoner2019-11-141-0/+13
| | | | | The function IsStandardTx() returns rejection reason "scriptsig-size" if any one the inputs' scriptSig is larger than 1650 bytes.
* 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-
* Merge #15921: validation: Tidy up ValidationState interfaceWladimir J. van der Laan2019-10-301-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3004d5a12d09d94bfc4dee2a8e8f2291996a4aaf [validation] Remove fMissingInputs from AcceptToMemoryPool() (John Newbery) c428622a5bb1e37b2e6ab2c52791ac05d9271238 [validation] Remove unused first_invalid parameter from ProcessNewBlockHeaders() (John Newbery) 7204c6434b944f6ad51b3c895837729d3aa56eea [validation] Remove useless ret parameter from Invalid() (John Newbery) 1a37de4b3174d19a6d8691ae07e92b32fdfaef11 [validation] Remove error() calls from Invalid() calls (John Newbery) 067981e49246822421a7bcc720491427e1dba8a3 [validation] Tidy Up ValidationResult class (John Newbery) a27a2957ed9afbe5a96caa5f0f4cbec730d27460 [validation] Add CValidationState subclasses (John Newbery) Pull request description: Carries out some remaining tidy-ups remaining after PR 15141: - split ValidationState into TxValidationState and BlockValidationState (commit from ajtowns) - various minor code style tidy-ups to the ValidationState class - remove the useless `ret` parameter from `ValidationState::Invalid()` - remove the now unused `first_invalid` parameter from `ProcessNewBlockHeaders()` - remove the `fMissingInputs` parameter from `AcceptToMemoryPool()`, and deal with missing inputs the same way as other errors by using the `TxValidationState` object. Tip for reviewers (thanks ryanofsky!): The first commit ("[validation] Add CValidationState subclasses" ) is huge and can be easier to start reviewing if you revert the rote, mechanical changes: Substitute the commit hash of commit "[validation] Add CValidationState subclasses" for <CommitHash> in the commands below. ```sh git checkout <CommitHash> git grep -l ValidationState | xargs sed -i 's/BlockValidationState\|TxValidationState/CValidationState/g' git grep -l ValidationResult | xargs sed -i 's/BlockValidationResult\|TxValidationResult/ValidationInvalidReason/g' git grep -l MaybePunish | xargs sed -i 's/MaybePunishNode\(ForBlock\|ForTx\)/MaybePunishNode/g' git diff HEAD^ ``` After that it's possible to easily see the mechanical changes with: ```sh git log -p -n1 -U0 --word-diff-regex=. <CommitHash> ``` ACKs for top commit: laanwj: ACK 3004d5a12d09d94bfc4dee2a8e8f2291996a4aaf amitiuttarwar: code review ACK 3004d5a12d09d94bfc4dee2a8e8f2291996a4aaf. Also built & ran tests locally. fjahr: Code review ACK 3004d5a12d09d94bfc4dee2a8e8f2291996a4aaf . Only nit style change and pure virtual destructor added since my last review. ryanofsky: Code review ACK 3004d5a12d09d94bfc4dee2a8e8f2291996a4aaf. Just whitespace change and pure virtual destructor added since last review. Tree-SHA512: 511de1fb380a18bec1944ea82b513b6192df632ee08bb16344a2df3c40811a88f3872f04df24bc93a41643c96c48f376a04551840fd804a961490d6c702c3d36
| * [validation] Add CValidationState subclassesJohn Newbery2019-10-291-3/+3
| | | | | | | | | | Split CValidationState into TxValidationState and BlockValidationState to store validation results for transactions and blocks respectively.
* | test: add reason checks for non-standard txs in test_IsStandardSebastian Falbesoner2019-10-291-0/+16
|/
* 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'
* scripted-diff: rename CBasicKeyStore to FillableSigningProviderAndrew Chow2019-07-091-6/+6
| | | | | | -BEGIN VERIFY SCRIPT- git grep -l "CBasicKeyStore" | xargs sed -i -e 's/CBasicKeyStore/FillableSigningProvider/g' -END VERIFY SCRIPT-
* Remove CKeyStore and squash into CBasicKeyStoreAndrew Chow2019-07-091-1/+1
|
* tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift2019-06-261-0/+1
| | | | unused includes in tests
* Replace CScriptID and CKeyID in CTxDestination with dedicated typesGregory Sanders2019-04-291-15/+15
|
* 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-
* [build] Move policy settings to new src/policy/settings unitJohn Newbery2019-04-091-0/+1
| | | | | | | | | | | | | This moves the following policy settings functions and globals to a new src/policy/settings unit in lib_server: - `incrementalRelayFee` - `dustRelayFee` - `nBytesPerSigOp` - `fIsBareMultisigStd` These settings are only required by the node and should not be accessed by other libraries.
* [build] Move CheckTransaction from lib_server to lib_consensusJohn Newbery2019-04-091-1/+1
| | | | | | | CheckTransaction is a context-free function that does not require access to the blockchain or mempool. Move it from src/consensus/tx_verify in lib_server to a new unit src/consensus/tx_check in lib_consensus so that it can be called by non-server libraries.
* Merge #14855: test: Correct ineffectual WithOrVersion from transactions_testsMarcoFalke2019-01-041-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 75778a0724 test: Correct ineffectual WithOrVersion from transactions_tests (Ben Woosley) Pull request description: `WithOrVersion` uses `|` to combine the versions, and `|` with 0 is a no-op. NicolasDorier / sipa do you recall why the version is being overridden here? Introduced in ab48c5e72156b34300db4a6521cb3c9969be3937 Last updated 81e3228fcb33e8ed32d8b9fbe917444ba080073a Tree-SHA512: 2aea925497bab2da973f17752410a6759d67181a57c3b12a685d184fbfcca2984c45b702ab0bd641d75e086696a0424f1bf77c5578ca765d6882dc03b42d5f9a
| * test: Correct ineffectual WithOrVersion from transactions_testsBen Woosley2019-01-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | WithOrVersion uses | to combine the versions, and | with 0 is a no-op. Instead I run it with PROTOCOL_VERSION and 0 separately, as the original code only tested PROTOCOL_VERSION but apparently only intended to test version 0. Introduced in ab48c5e72156b34300db4a6521cb3c9969be3937 Last updated 81e3228fcb33e8ed32d8b9fbe917444ba080073a
* | Merge #13743: refactor: Replace boost::bind with std::bindMarcoFalke2018-12-291-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb53b825c2 scripted-diff: Replace boost::bind with std::bind (Chun Kuan Lee) 2196c51821 refactor: Use boost::scoped_connection in signal/slot, also prefer range-based loop instead of std::transform (Chun Kuan Lee) Pull request description: Replace boost::bind with std::bind - In `src/rpc/server.cpp`, replace `std::transform` with simple loop. - In `src/validation.cpp`, store the `boost::signals2::connection` object and use it to disconnect. - In `src/validationinterface.cpp`, use 2 map to store the `boost::signals2::scoped_connection` object. Tree-SHA512: 6653cbe00036fecfc495340618efcba6d7be0227c752b37b81a27184433330f817e8de9257774e9b35828026cb55f11ee7f17d6c388aebe22c4a3df13b5092f0
| * | scripted-diff: Replace boost::bind with std::bindChun Kuan Lee2018-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for j in $(seq 1 5) do sed -i "s/ _${j}/ std::placeholders::_${j}/g" $(git grep --name-only " _${j}" -- '*.cpp' '*.h') done sed -i "s/boost::bind/std::bind/g" $(git grep --name-only boost::bind -- '*.cpp' '*.h') sed -i "s/boost::ref/std::ref/g" $(git grep --name-only boost::ref -- '*.cpp' '*.h') sed -i '/boost\/bind/d' $(git grep --name-only boost/bind) -END VERIFY SCRIPT-
* | | tests: Test for expected return values when calling functions returning a ↵practicalswift2018-12-131-18/+18
| | | | | | | | | | | | success code
* | | Removed implicit CTransaction constructor from testslucash-dev2018-12-111-23/+23
| |/ |/|
* | scripted-diff: Move util files to separate directory.Jim Posen2018-11-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
* Make objects in range declarations immutable by default. Avoid unnecessary ↵practicalswift2018-08-271-1/+1
| | | | copying of objects in range declarations.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Remove redundant unused variablespracticalswift2018-07-181-1/+0
|
* Remove CombineSignatures and replace testsAndrew Chow2018-07-031-4/+13
| | | | | Removes CombineSignatures and replaces its use in tests with ProduceSignature to test the same behavior for ProduceSignature.
* Make SignatureData able to store signatures and scriptsAndrew Chow2018-07-031-4/+4
| | | | | | | | | | | | | | | | | In addition to having the scriptSig and scriptWitness, have SignatureData also be able to store just the signatures (pubkeys mapped to sigs) and scripts (script ids mapped to scripts). Also have DataFromTransaction be able to extract signatures and scripts from the scriptSig and scriptWitness of an input to put them in SignatureData. Adds a new SignatureChecker which takes a SignatureData and puts pubkeys and signatures into it when it successfully verifies a signature. Adds a new field in SignatureData which stores whether the SignatureData was complete. This allows us to also update the scriptSig and scriptWitness to the final one when updating a SignatureData with another one.
* Drop UpdateTransaction in favor of UpdateInputBen Woosley2018-05-181-4/+4
| | | | | | | | Updating the input explicitly requires the caller to present a mutable input, which more clearly communicates the effects and intent of the method. In most cases, this input is already immediately available and need not be looked up.
* Merge #11423: [Policy] Several transaction standardness rulesWladimir J. van der Laan2018-05-121-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 364bae5 qa: Pad scriptPubKeys to get minimum sized txs (MarcoFalke) 7485488 Policy to reject extremely small transactions (Johnson Lau) 0f8719b Add transaction tests for constant scriptCode (Johnson Lau) 9dabfe4 Add constant scriptCode policy in non-segwit scripts (Johnson Lau) Pull request description: This disables `OP_CODESEPARATOR` in non-segwit scripts (even in an unexecuted branch), and makes a positive `FindAndDelete` result invalid. This ensures that the `scriptCode` serialized in `SignatureHash` is always the same as the script passing to the `EvalScript`. Tree-SHA512: a0552cb920294d130251c48053fa2ff1fbdd26332e62b52147d918837852750f0ce35ce2cd1cbdb86588943312f8154ccb4925e850dbb7c2254bc353070cd5f8
| * Add transaction tests for constant scriptCodeJohnson Lau2018-05-051-0/+1
| | | | | | | | Tests showing that CONST_SCRIPTCODE is applied only to non-segwit transactions