aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-06-20Further DoS prevention: Verify signatures lastGavin Andresen
Loop over all inputs doing inexpensive validity checks first, and then loop over them a second time doing expensive signature checks. This helps prevent possible CPU exhaustion attacks where an attacker tries to make a victim waste time checking signatures for invalid transactions.
2012-06-20Optimize orphan transaction handlingGavin Andresen
Changes suggested by Sergio Demian Lerner to help prevent potential DoS attacks.
2012-06-18Don't overflow integer on 32-bit machines.Ricardo M. Correia
This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv.
2012-06-18Don't overflow signed ints in CBigNum::setint64().Ricardo M. Correia
CBigNum::setint64() does 'n <<= 8', where n is of type "long long". This leads to shifting onto and past the sign bit, which is undefined behavior in C++11 and can cause problems in the future.
2012-06-18Document how to build/run unit testsGavin Andresen
2012-06-14Include limits, not climints (using std::numeric_limits now)Gavin Andresen
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-14Update wiki changelog at doc/release-process.txtMatt Corallo
2012-06-14Bump VERSION so we can differentiate between fixed 0.4.7rc2 and not-fixed ↵Luke Dashjr
0.4.7rc1
2012-06-12Bugfix: Move IsStandard scriptSig size check out of IsPushOnly, since BIP16 ↵Luke Dashjr
verification uses the latter too This caused clients to reject block #177618 since it has a P2SH transaction with over 200 bytes in scriptSig. (Upstream commit: e679ec969c8b22c676ebb10bea1038f6c8f13b33)
2012-06-06fix an incorrect if-clause in net.cppPhilip Kaufmann
2012-06-06Serialize access to debug.log streamMichael Hendricks
Acquire an exclusive, advisory lock before sending output to debug.log and release it when we're done. This should avoid output from multiple threads being interspersed in the log file. We can't use CRITICAL_SECTION machinery for this because the debug log is written during startup and shutdown when that machinery is not available. (Thanks to Gavin for pointing out the CRITICAL_SECTION problems based on his earlier work in this area)
2012-05-26.gitignore: add test_bitcoinJeff Garzik
2012-05-22Prevent crashes due to missing or corrupted blk????.dat recordsJeff Garzik
2012-05-22Prevent crashes due to missing or corrupted database recordsJeff Garzik
Any problems seen during deserialization will throw an uncaught exception, crashing the entire bitcoin process. Properly return an error instead, so that we may at least log the error and gracefully shutdown other portions of the app.
2012-05-22Correct debug.log output to show correct function the debug is coming from.R E Broadley
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-20remove 2 ugly spaces from a message stringPhilip Kaufmann
(PARTIAL of 966ae00)
2012-05-18Always check return values of TxnBegin() and TxnCommit()Jeff Garzik
PARTIAL, since d68dcf7 isn't backported (yet)
2012-05-17Hopefully final fix for the stuck blockchain issuePieter Wuille
Immediately issue a "getblocks", instead of a "getdata" (which will trigger the relevant "inv" to be sent anyway), and only do so when the previous set of invs led us into a known and attached part of the block tree.
2012-05-08Bump version to 0.4.7Luke Dashjr
2012-05-07Prevent stuck download: correct solutionPieter Wuille
Pull request #948 introduced a fix for nodes stuck on a long side branch of the main chain. The fix was non-functional however, as the additional getdata request was created in a first step of processing, but dropped in a second step as it was considered redundant. This commits fixes it by sending the request directly.
2012-05-07Prevent stuck block download in large reorganisationsPieter Wuille
In cases of very large reorganisations (hundreds of blocks), a situation may appear where an 'inv' is sent as response to a 'getblocks', but the last block mentioned in the inv is already known to the receiver node. However, the supplying node uses a request for this last block as a trigger to send the rest of the inv blocks. If it never comes, the block chain download is stuck. This commit makes the receiver node always request the last inv'ed block, even if it is already known, to prevent this problem.
2012-05-06Bugfix: %-12I64d is not valid and causes the parameter to be skipped, use ↵Luke Dashjr
%12"PRI64d" instead Conflicts: src/walletdb.cpp
2012-05-04Check earlier for blocks with duplicate transactions. Fixes #1167Gavin Andresen
2012-05-04remove obsolete BackupWallet() entry in wallet.hPhilip Kaufmann
2012-05-01fix compiler warning "suggest parentheses around assignment used as truthPhilip Kaufmann
value [-Wparentheses]" in util.cpp
2012-05-01remove unused typedef in serialize.hPhilip Kaufmann
2012-04-27Windows build: compile against openssl 1.0.1bGavin Andresen
2012-04-27Bump version to 0.4.6Luke Dashjr
2012-04-27We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)Timothy Redaelli
2012-04-24CBlock::WriteToDisk() properly checks ftell(3) for error returnJeff Garzik
Rather than storing ftell(3)'s return value -- a long -- in an unsigned int, we store and check a properly typed temp. Then, assured a non-negative value, we store in nBlockPosRet.
2012-04-22Add missing includes. (Fix bulding under GCC 4.7)Timothy Redaelli
(Note: GCC 4.7 build NOT tested with backports -Luke)
2012-04-22Fix bugs on 'unsigned char' platforms.Dwayne C. Litzenberger
In ISO C++, the signedness of 'char' is undefined. On some platforms (e.g. ARM), 'char' is an unsigned type, but some of the code relies on 'char' being signed (as it is on x86). This is indicated by compiler warnings like this: bignum.h: In constructor 'CBigNum::CBigNum(char)': bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits] util.cpp: In function 'bool IsHex(const string&)': util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits] In particular, IsHex erroneously returned true regardless of the input characters, as long as the length of the string was a positive multiple of 2. Note: For testing, it's possible using GCC to force char to be unsigned by adding the -funsigned-char parameter to xCXXFLAGS.
2012-04-22Fix phexdigits[255] is undefined.Dwayne C. Litzenberger
2012-04-17Fix potential deadlockPieter Wuille
Conflict: * cs_main in ProcessMessages() (before calling ProcessMessages) * cs_vSend in CNode::BeginMessage versus: * cs_vSend in ThreadMessageHandler2 (before calling SendMessages) * cs_main in SendMessages Even though cs_vSend is a try_lock, if it succeeds simultaneously with the locking of cs_main in ProcessMessages(), it could cause a deadlock.
2012-04-17Fix misc. minor sign-comparison warningsJeff Garzik
2012-04-17CNode's nHeaderStart may be negative, so change its type (PARTIAL)Jeff Garzik
2012-04-17Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik
foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
2012-04-17The string class returns string::npos, when find() fails.Jeff Garzik
Noticed when sign-comparison warnings were enabled.
2012-04-17AlreadyHave(): only hold lock during mapTransactions accessJeff Garzik
2012-04-17Locking fix for AlreadyHave()Jeff Garzik
Access to mapTransactions[] must be guarded by cs_mapTransactions lock.
2012-04-15fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan
2012-04-15fix warnings: delete called on 'XX' that has virtual functions but ↵Wladimir J. van der Laan
non-virtual destructor [-Wdelete-non-virtual-dtor]
2012-04-15fix warnings: array subscript is of type 'char' [-Wchar-subscripts]Wladimir J. van der Laan
2012-04-15work around issue in boost::program_options that prevents from compiling in ↵Wladimir J. van der Laan
clang
2012-04-14Bug fix listtransactions from/count handling.Gavin Andresen
2012-04-05Verify status of encrypt/decrypt calls to detect failed paddingPieter Wuille
2012-04-04Add laanwj to gitian download scripts.Matt Corallo
2012-04-04Add Luke-Jr's PGP key to gitian-downloaderLuke Dashjr