Pieter Wuille
f621326c24
Clean up warnings
...
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters
* Remove xCXXFLAGS usage in makefile.unix
* Fix several recent and older sign-compare warnings
13 years ago
Pieter Wuille
39857190de
Support for multiple local addresses
13 years ago
Gavin Andresen
9e71a5cd23
Define TEST_DATA_DIR so unit tests can be run from any current working directory
13 years ago
Jeff Garzik
7bd9c3a3cf
SigOp and orphan-tx constants and counts are always unsigned.
...
Fixes several sign-comparison warnings.
13 years ago
Gavin Andresen
8449a8788a
Data-drive script evaluation unit tests.
13 years ago
Wladimir J. van der Laan
88dc2d6c6a
Integrate @JoelKatz's optimized ToHex ( #562 ) into current HexStr function
13 years ago
Pieter Wuille
e46704dd90
Expose CRPCTable via bitcoinrpc.h for testing
13 years ago
Pieter Wuille
0a83c0fcef
Fix tests after recent refactors
13 years ago
Chris Moore
b3a6e613fc
CBitcoinSecret::SetString() now calls IsValid() to make sure it was passed something with the correct version.
13 years ago
Pieter Wuille
f8dcd5ca6f
Use scoped locks instead of CRITICAL_BLOCK
13 years ago
Gavin Andresen
142e604184
DoS fix for mapOrphanTransactions
13 years ago
Pieter Wuille
c4341fa6ab
Add mruset and use it for setInventoryKnown
13 years ago
Pieter Wuille
0d56f11ada
Fix tests after 38067c18
13 years ago
Gavin Andresen
3ad9f8a70f
New GetArg features: allow --, and booleans can be -foo or -nofoo
13 years ago
Gavin Andresen
3ae0735553
Unit tests for the GetArg() methods
13 years ago
Gavin Andresen
137d0685a4
Simplify counting of P2SH sigops to match BIP 16 (thanks to Matt Corallo for prompting this).
...
This also removes an un-needed sigops-per-byte check when accepting transactions to the memory pool (un-needed assuming only standard transactions are being accepted). And it only counts P2SH sigops after the switchover date.
13 years ago
Gavin Andresen
39f0d96860
Make transactions with extra data in their scriptSig's non-standard.
13 years ago
Gavin Andresen
8d7849b6db
Refactored ConnectInputs, so valid-transaction-checks are done before ECDSA-verifying signatures.
13 years ago
Gavin Andresen
922e8e2929
Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).
13 years ago
Pieter Wuille
b3974ec9d4
Unit tests for EC key routines
...
This tests:
* creation of keys from base58-encoded strings
* extracting public keys and addresses
* compressed public keys
* compact signatures and key recovery
13 years ago
Pieter Wuille
67a42f929b
Network stack refactor
...
This introduces CNetAddr and CService, respectively wrapping an
(IPv6) IP address and an IP+port combination. This functionality used
to be part of CAddress, which also contains network flags and
connection attempt information. These extra fields are however not
always necessary.
These classes, along with logic for creating connections and doing
name lookups, are moved to netbase.{h,cpp}, which does not depend on
headers.h.
Furthermore, CNetAddr is mostly IPv6-ready, though IPv6
functionality is not yet enabled for the application itself.
13 years ago
coderrr
6ec76ca09e
make sure IsMine only returns true when we own all keys
13 years ago
Gavin Andresen
6d6d392b22
Fixed OP_EVAL recursion unit test, checks for both infinite and exactly-3-deep recursion
13 years ago
Gavin Andresen
2e17ac83c6
Fix broken ExtractAddress (refactored, made callers check for addresses in keystore if they care)
13 years ago
Wladimir J. van der Laan
bde280b9a4
Revert "Use standard C99 (and Qt) types for 64-bit integers"
...
This reverts commit 21d9f36781
.
13 years ago
Luke Dashjr
21d9f36781
Use standard C99 (and Qt) types for 64-bit integers
13 years ago
Gavin Andresen
2a45a494b0
Use block times for 'hard' OP_EVAL switchover, and refactored EvalScript
...
so it takes a flag for how to interpret OP_EVAL.
Also increased IsStandard size of scriptSigs to 500 bytes, so
a 3-of-3 multisig transaction IsStandard.
13 years ago
Gavin Andresen
a0871afb2b
Interpret OP_EVAL as OP_NOP until Feb 1, 2012
13 years ago
Gavin Andresen
e679ec969c
OP_EVAL implementation
...
OP_EVAL is a new opcode that evaluates an item on the stack as a script.
It enables a new type of bitcoin address that needs an arbitrarily
complex script to redeem.
13 years ago
Gavin Andresen
cc40ba2151
Global fixture to send output to console instead of debug.log
13 years ago
Gavin Andresen
bf798734db
Support 3 new multisignature IsStandard transactions
...
Initial support for (a and b), (a or b), and 2-of-3 escrow
transactions (where a, b, and c are keys).
13 years ago
Gavin Andresen
1466b8b78a
Rework unit tests so test_bitcoin.cpp does not #include them all
13 years ago
Gavin Andresen
10fd7f6689
Orphan block fill-up-memory attack prevention
13 years ago
Gavin Andresen
eb5fff9e16
Moved checkpoints out of main, to prep for using them to help prevent DoS attacks
13 years ago
Clark Gaebel
f873b84d6e
Added simple critical section test cases.
13 years ago
Gavin Andresen
9e5322d23a
Fix miner_test unit test bug
13 years ago
Gavin Andresen
3504801778
Declare integer constant LL
13 years ago
Wladimir J. van der Laan
2f7f2a5fca
remove possibility of 63 bit overflow in ParseMoney
...
- also, add unit tests for various functions in util.cpp/util.h
13 years ago
Nils Schneider
6ccff2cbde
remove cryptopp dependency, add simple unittest for SHA256Transform()
13 years ago
Wladimir J. van der Laan
a8b95ce6ed
use median filter for peer-reported reported number of blocks
...
- fixes problem that one misconfigured or malicious node can mess up progress bar
- implementation in src/util.h
- testcase in src/test/util_tests.cpp
13 years ago
Pieter Wuille
e93bf37e86
Test case for base64 encode/decode
13 years ago
Gavin Andresen
15f3ad4dbd
Framework for banning mis-behaving peers
13 years ago
Gavin Andresen
829e21733b
CHECKMULTISIG unit tests.
13 years ago
Matt Corallo
2c3691d53d
Cleanup test suite output to be more useful.
13 years ago
Matt Corallo
3c8cecda1f
Add file for transaction tests.
13 years ago
Vegard Nossum
a8330e0049
Add a file for script tests
13 years ago
Vegard Nossum
e707d29dd6
Fix testing setup
...
There were some problems with the existing testing setup:
- Makefile rules for test-file compilation used CFLAGS instead of
CXXFLAGS in makefile.unix
13 years ago
Gavin Andresen
8baf865c94
Boost unit-testing framework.
...
make -f makefile.{unix,osx,mingw} test_bitcoin
to compile dumb, do-almost-nothing placeholder unit tests.
14 years ago