Age | Commit message (Collapse) | Author |
|
|
|
Prevent denial-of-service attacks by banning
peers that send us invalid orphan transactions
and only storing orphan transactions given to
us by a peer while the peer is connected.
Rebased-From: c74332c67806ed92e6e18de174671a7c30608780
|
|
Rebased-From: 48d8eb1 27bff74 4f497cd 05e3ecf 90320d6 b1fdd54
|
|
Make DateTimeStrFormat use boost::posix_time.
Also re-enable the util_DateTimeStrFormat tests, as they are no
longer platform specific.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 3e8ac6a
|
|
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: f6b7c64
|
|
Size specifiers are no longer needed now that we use typesafe tinyformat
for string formatting, instead of the system's sprintf.
No functional changes.
This continues the work in #3735.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 783b182
|
|
d3081fa Removed LevelDB changes (super3)
|
|
Syntax Highlighting
|
|
Unit tests with DEBUG_LOCKORDER were running into assertions.
|
|
Fix for GetBlockValue() after block 13,440,000
|
|
Because no one wants 4 gold mines being discovered every mibillenium.
|
|
|
|
|
|
|
|
3cb1edb Update moved and dead links (Luke Dashjr)
|
|
Building the tests was giving some vague error message about a doubly-defined
symbol.
The solution is to define ShutdownRequested in test_bitcoin.cpp as well
so that init.cpp does not get pulled in.
|
|
|
|
- Add license headers to source files (years based on commit dates)
in `src/test` as well as `qa`
- Add `README.md` to `src/test/data` specifying MIT license
Fixes #3848
|
|
2b45345 minor style cleanups (Philip Kaufmann)
|
|
|
|
than [0].
|
|
f59d8f0 Per-peer block download tracking and stalled download detection. (Pieter Wuille)
|
|
fecba4e Total money limit test (Pieter Wuille)
|
|
Added bounds check by @il--ya.
Updated-by: Wladimir van der Laan <laanwj@gmail.com>
|
|
script: reduce OP_RETURN standard relay bytes to 40
|
|
Per mailing list discussion.
|
|
Remove PRIx64 usage completely
|
|
e6c6bc9 Adds additional zero checks for setCompact These encoded values should all decode to zero (Noel Tiernan)
|
|
a3138ed add test of DecodeBase58 skipping whitespace (Christian von Roques)
|
|
Drop fees by 10x due to the persistently higher exchange rate.
|
|
Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h
indirectly, so we cannot fix this with just macros.
Trivial commit: apply the following script to all .cpp and .h files:
# Middle
sed -i 's/"PRIx64"/x/g' "$1"
sed -i 's/"PRIu64"/u/g' "$1"
sed -i 's/"PRId64"/d/g' "$1"
# Initial
sed -i 's/PRIx64"/"x/g' "$1"
sed -i 's/PRIu64"/"u/g' "$1"
sed -i 's/PRId64"/"d/g' "$1"
# Trailing
sed -i 's/"PRIx64/x"/g' "$1"
sed -i 's/"PRIu64/u"/g' "$1"
sed -i 's/"PRId64/d"/g' "$1"
After this commit, `git grep` for PRI.64 should turn up nothing except
the defines in util.h.
|
|
|
|
|
|
Keep track of which block is being requested (and to be requested) from
each peer, and limit the number of blocks in-flight per peer. In addition,
detect stalled downloads, and disconnect if they persist for too long.
This means blocks are never requested twice, and should eliminate duplicate
downloads during synchronization.
|
|
c32a486 Add more data-driven tests. (Matt Corallo)
|
|
|
|
665bdd3 Fix off-by-one errors in use of IsFinalTx() (Peter Todd)
|
|
Previously CreateNewBlock() didn't take into account the fact that
IsFinalTx() without any arguments tests if the transaction is considered
final in the *current* block, when both those functions really needed to
know if the transaction would be final in the *next* block.
Additionally the UI had a similar misunderstanding.
Also adds some basic tests to check that CreateNewBlock() is in fact
mining nLockTime-using transactions correctly.
Thanks to Wladimir J. van der Laan for rebase.
|
|
Unit tests would fail if compiled with -DDEBUG_LOCKORDER (AssertLockHeld()
would fail; AssertLockHeld() relies on the DEBUG_LOCKORDER code to keep
track of locks held).
Fixed by LOCK'ing the wallet mutex in the unit tests that manipulate the
wallet.
|
|
These encoded values should all decode to zero
Positive Numbers
0x01003456 (1 byte 0x00)
0x02000056 (2 bytes 0x0000)
0x03000000 (3 bytes 0x000000)
0x04000000 (4 bytes 0x000000_00)
Negative Numbers
0x00923456 -(0 bytes, so zero)
0x01803456 -(1 byte 0x00)
0x02800056 -(2 bytes 0x0000)
0x03800000 -(3 bytes 0x000000)
0x04800000 -(4 bytes 0x000000_00)
|
|
- keep headers in alphabetical order
- fix Makefile.am (2 files in 1 line - leftover)
- remove some spaces etc.
|
|
This makes it easier to read diffs.
Cosmetic change to build system only.
|
|
Test for mingw/wine issue #3494, where the upper word of time(NULL)
return value gets clobbered.
|
|
Unit tests for uint256.h. The file uint160_tests.cpp is no longer
needed. The ad-hoc tests which were in uint256.h are also no longer
needed. The new tests achieve 100% coverage.
|
|
9e9056c Remove -logtodebugger (Wladimir J. van der Laan)
|
|
Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove
them.
|
|
platform.
Instead, use have an exception object to check if the string returned by what() on the raised exception matches the string returned by what() on the expected exception instance.
This way, we do not need to list all different possible explanatory strings for different platforms in the test code, and make it simple. (The idea is by Cory Fields.)
|
|
Before the fix, there were 6 errors such as :
serialize_tests.cpp:77: error in "noncanonical": incorrect exception std::ios_base::failure is caught
It turns out that ex.what() returns following string instead of "non-canonical ReadCompactSize()"
"non-canonical ReadCompactSize(): unspecified iostream_category error"
After the fix, unit test passed.
The test ran using Apple LLVM v5.0 on OSX 10.9 and the unit test error happened because of different error messages by different compilers.
g++ --version on my development environment.
```
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
```
|
|
`-logtodebugger` is a strange, obscure, WIN32-only (mostly MSVC) thing.
Let's clean up the options a bit get rid of it.
test_bitcoin was using fLogToDebugger as a way to prevent logging to
debug.log. For this, add a boolean (not exposed as option) fLogToDebugLog that
defaults to true and is disabled in the tests.
|
|
(P2SH)
|