Peter Todd
ca8158719b
Test the exact order of CHECKMULTISIG sig/pubkey evaluation
...
Possible with STRICTENC
10 years ago
Pieter Wuille
98b135f97f
Make STRICTENC invalid pubkeys fail the script rather than the opcode.
...
This turns STRICTENC turn into a softforking-safe change (even though it
is not intended as a consensus rule), and as a result guarantee that using
it for mempool validation only results in consensus-valid transactions in
the mempool.
10 years ago
Cory Fields
269efa30ed
build: add quick consensus lib tests
...
They should be hooked up in other places as well, but this is a start.
10 years ago
Luke Dashjr
132ea9b48f
miner_tests: Disable checkpoints so they don't fail the subsidy-change test
10 years ago
Pieter Wuille
4c97c64bf6
Do not use EC code in global constructors
10 years ago
Peter Todd
03914234b3
Discourage NOPs reserved for soft-fork upgrades
...
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.
10 years ago
Flavien Charlon
44e9a6b22e
Update the 'test_IsStandard' unit test
...
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.
10 years ago
Cory Fields
219a1470c4
script: check ScriptError values in script tests
10 years ago
Pieter Wuille
f4e0aefadc
Do signature-s negation inside the tests
...
To avoid the need for libsecp256k1 to expose such functionality.
10 years ago
Pavel Janík
84738627ce
Fix all header defines
10 years ago
Cory Fields
d2e74c55bd
boost: moveonly: split CPubKey and friends to new files
10 years ago
Cory Fields
f635269cd1
tests: enable alertnotify test for Windows
...
The semantics of "echo" are different there and they change the resulting text,
but they're still correct and predictable.
10 years ago
Cory Fields
71697f97d3
Separate protocol versioning from clientversion
10 years ago
Luke Dashjr
1bea2bbddc
Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it
10 years ago
jtimon
561e9e9de9
MOVEONLY: Move script/compressor out of script and put CTxOutCompressor (from
...
core) with it
10 years ago
jtimon
4a3587d8db
MOVEONLY: Separate CTransaction and dependencies from core
10 years ago
Peter Todd
16d78bd68e
Add valid invert of invalid every numeric opcode tests
10 years ago
Peter Todd
2b62e1796b
Clearly separate PUSHDATA and numeric argument MINIMALDATA tests
10 years ago
Peter Todd
dfeec18b85
Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule
10 years ago
Peter Todd
554147ad9e
Ensure MINIMALDATA invalid tests can only fail one way
...
Removes the need for the 'negated' versions of the tests, and ensures
other failures don't mask what we're trying to test.
10 years ago
Pieter Wuille
698c6abb25
Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)
...
Also use the new flag as a standard rule, and replace the IsCanonicalPush
standardness check with it (as it is more complete).
10 years ago
Pieter Wuille
d752ba86c1
Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)
10 years ago
Cory Fields
fa7361907a
boost: split stream classes out of serialize.h
...
serialization now has no dependencies.
10 years ago
Wladimir J. van der Laan
a873823864
CAutoFile: Explicit Get() and remove unused methods
...
Also add documentation to some methods.
10 years ago
randy-waterhouse
a3c26c2e85
Fixes for missing boost tuple.hpp header include.
10 years ago
Pieter Wuille
a96d113962
Rename CWalletInterface to CValidationInterface
...
It's useful for much more than wallets.
10 years ago
Cory Fields
85c579e3a6
script: add a slew of includes all around and drop includes from script.h
...
Lots of files ended up with indirect includes from script.h.
10 years ago
Cory Fields
e9ca4280f3
script: add ToByteVector() for converting anything with begin/end
...
This should move to a util header once their dependencies are cleaned up.
10 years ago
Cory Fields
066e2a1403
script: move CScriptID to standard.h and add a ctor for creating them from 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();
10 years ago
Cory Fields
5f4bcf6b14
boost: drop boost dependency in version.cpp.
...
Also add a test to verify.
10 years ago
Pieter Wuille
f244c99c96
Remove CheckMinWork, as we always know all parent headers
10 years ago
Luke
e21b2e0d5f
Typo in test
10 years ago
Pieter Wuille
9df9cf5a9f
Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
...
* Delete canonical_tests.cpp, and move the tests to script_tests.cpp.
* Split off SCRIPT_VERIFY_DERSIG from SCRIPT_VERIFY_STRICTENC (the BIP62 part of it).
* Change signature STRICTENC/DERSIG semantics to fail the script entirely rather than the CHECKSIG result (softfork safety, and BIP62 requirement).
* Add many autogenerated tests for several odd cases.
* Mention specific BIP62 rules in the script verification flags.
10 years ago
Pieter Wuille
2c930d932b
Prettify JSON tests and minimize diffs
10 years ago
Cozz Lovan
44bc988e7b
[Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..)
10 years ago
jtimon
54510f2672
DRY: Avoid repetitions in script_test
10 years ago
Pieter Wuille
e790c370b5
Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker
10 years ago
Pieter Wuille
c7829ea797
Abstract out SignatureChecker
10 years ago
Eric Shaw
bc470c43ee
Changed mixed indentation to four spaces
...
Put `test/rpc_wallet_tests.cpp` through clang-format.
10 years ago
Eric Shaw
31d6390fd1
Fixed setaccount accepting foreign address
...
Fixed issue #4209 where using setaccount with a foreign
address causes the address to be added to your receiving addresses.
10 years ago
SergioDemianLerner
f0fd00cb77
Switch testing framework from MAIN to new UNITTEST network
...
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
10 years ago
Wladimir J. van der Laan
8d132431b4
Revert merge of pull #4845
...
It breaks the new mingw tests!
See
- https://travis-ci.org/bitcoin/bitcoin/jobs/36845581
- https://travis-ci.org/bitcoin/bitcoin/jobs/36845582
This reverts commit 4705902777
, 5e2e7fcb99
, a25fd6be13
.
10 years ago
Cory Fields
63c17613ab
tests: fix false-positive under win64
...
BN_ULONG isn't necessarily an unsigned long, as is the case on win64.
10 years ago
Cory Fields
41d67c78bf
tests: fix python test-runner for windows
...
Windows needed a few fixups to get the tests running:
1. bitcoin-tx needs a file extension in Windows. Take this opportunity to
add an env file, which pulls variables out of our build config. This can
be extended as needed, for now it's very simple.
2. After #1 , split the args out of the exec key in the test data.
3. Correct the line-endings from windows stdout
10 years ago
Pieter Wuille
68af7d02cf
Fix vector out of bounds in script tests
10 years ago
SergioDemianLerner
5e2e7fcb99
Suggested corrections on comments, variable names.
...
Also new test case testing the PoW skip in UNITTEST.
10 years ago
SergioDemianLerner
a25fd6be13
Switch testing framework from MAIN to new UNITTEST network
...
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
10 years ago
Mark Friedenbach
a372168e77
Use a typedef for monetary values
10 years ago
Pieter Wuille
8138cbea3c
Add automatic script test generation, and actual checksig tests
10 years ago
Cory Fields
eee030f6bc
autofile: don't copy CAutoFile by value
10 years ago