aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix possible block db breakage during re-indexCory Fields2015-03-101-1/+4
| | | | | | | | | | | | | | | | When re-indexing, there are a few cases where garbage data may be skipped in the block files. In these cases, the indices are correctly written to the index db, however the pointer to the next position for writing in the current block file is calculated by adding the sizes of the valid blocks found. As a result, when the re-index is finished, the index db is correct for all existing blocks, but the next block will be written to an incorrect offset, likely overwriting existing blocks. Rather than using the sum of all valid blocks to determine the next write position, use the end of the last block written to the file. Don't assume that the current block is the last one in the file, since they may be read out-of-order.
* Replace CBlockHeader::GetHash with call to SerializeHashWladimir J. van der Laan2015-03-061-12/+1
| | | | | Removes variability between LE and BE. As suggested by @sipa.
* Add serialize float/double testsWladimir J. van der Laan2015-03-061-3/+93
|
* src/txmempool.cpp: make numEntries a uint32_tWladimir J. van der Laan2015-03-061-2/+2
| | | | | Don't ever serialize a size_t or long, their sizes are platform dependent.
* src/arith_256.cpp: bigendian compatibilityWladimir J. van der Laan2015-03-061-4/+5
|
* src/netbase.h: Fix endian in CNetAddr serializationWladimir J. van der Laan2015-03-061-1/+1
| | | | | | | | We've chosen to htons/ntohs explicitly on reading and writing (I do not know why). But as READWRITE already does an endian swap on big endian, this means the port number gets switched around, which was what we were trying to avoid in the first place. So to make this compatible, serialize it as FLATDATA.
* src/serialize.h: base serialization level endianness neutralityWladimir J. van der Laan2015-03-062-76/+149
| | | | Serialization type-safety and endianness compatibility.
* src/script/script.h: endian compatibility for PUSHDATA sizesWladimir J. van der Laan2015-03-061-7/+9
|
* src/primitives/transaction.h: endian compatibility in serializationWladimir J. van der Laan2015-03-061-1/+2
|
* src/primitives/block.cpp: endian compatibility in GetHashWladimir J. van der Laan2015-03-061-0/+12
|
* src/net.cpp: endian compatibility in EndMessageWladimir J. van der Laan2015-03-061-1/+2
|
* src/main.cpp: endian compatibility in packet checksum checkWladimir J. van der Laan2015-03-061-2/+1
|
* src/hash.cpp: endian compatibilityWladimir J. van der Laan2015-03-061-2/+4
|
* build: Endian compatibilityWladimir J. van der Laan2015-03-064-65/+254
| | | | | | | | - Detect endian instead of stopping configure on big-endian - Add `byteswap.h` and `endian.h` header for compatibility with Windows and other operating systems that don't come with them - Update `crypto/common.h` functions to use compat endian header
* Merge pull request #5843Wladimir J. van der Laan2015-03-062-0/+7
|\ | | | | | | ba04c4a Limit message sizes before transfer (Pieter Wuille)
| * Limit message sizes before transferPieter Wuille2015-03-062-0/+7
| | | | | | | | | | This introduces a fixed limit for the size of p2p messages, and enforces it before download.
* | Merge pull request #5813Wladimir J. van der Laan2015-03-064-1/+74
|\ \ | |/ |/| | | 34e5015 Add unit tests for next difficulty calculations (Ross Nicoll)
| * Add unit tests for next difficulty calculationsRoss Nicoll2015-02-214-1/+74
| | | | | | | | | | | | | | Split GetNextWorkRequired() into two functions to allow the difficulty calculations to be tested without requiring a full blockchain. Add unit tests to cover basic difficulty calculation, plus each of the min/max actual time, and maximum difficulty target conditions.
* | QT: remove unused parameterRob Van Mieghem2015-03-052-3/+3
| |
* | Merge pull request #5830Wladimir J. van der Laan2015-03-052-4/+0
|\ \ | | | | | | | | | 6f1274c qt: Don't save geometry for options and about/help window (Wladimir J. van der Laan)
| * | qt: Don't save geometry for options and about/help windowWladimir J. van der Laan2015-02-262-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These dialogs will be something that people occasionally open, not keep open during their session, so just popping it up in a sensible place is good enough. Remembering only creates potential issues, like spawning it outside the current screen area. On Ubuntu this causes the dialogs to be positioned in the middle of the main dialog, so I didn't add code for that. YMMV. Inspired by github pull #5777 by @L-Cranston-Shadow
* | | Merge pull request #5775Wladimir J. van der Laan2015-03-033-14/+6
|\ \ \ | | | | | | | | | | | | | | | | deda3e1 [Qt] remove unused getNumBlocksAtStartup() from ClientModel (Philip Kaufmann) 47ee8cf [Qt] use qint64 in BitcoinGUI::setNumBlocks (Philip Kaufmann)
| * | | [Qt] remove unused getNumBlocksAtStartup() from ClientModelPhilip Kaufmann2015-02-092-11/+3
| | | |
| * | | [Qt] use qint64 in BitcoinGUI::setNumBlocksPhilip Kaufmann2015-02-091-3/+3
| | | | | | | | | | | | | | | | | | | | - as QDateTime.secsTo() returns a qint64 also store in a qint64 and not in an integer
* | | | Merge pull request #5819Wladimir J. van der Laan2015-03-032-96/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d23b0a2 depends: always use static qt5 for linux (Cory Fields) 3448b13 build: fix typo in configure help (Cory Fields) c95ac83 gitian: fix x86_64 build with static libstdc++ (Cory Fields) 0671516 build: change reduce exports/static libstdc++ options for gitian and travis (Cory Fields) aa36730 build: remove libstdc++ backwards-compat (Cory Fields) 3ee028f build: disable reduced exports by default (Cory Fields)
| * | | | build: remove libstdc++ backwards-compatCory Fields2015-02-232-96/+0
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Backwards-compatibility for libstdc++ is not limited to straightforward abi changes. Symbol visibility also needs to be taken into consideration, and that really can't be addressed simply. Instead, just static-link libstdc++ for backwards-compat.
* | | | Merge pull request #5839Pieter Wuille2015-03-033-38/+0
|\ \ \ \ | | | | | | | | | | | | | | | 16a58a8 keys: remove libsecp256k1 verification until it's actually supported (Cory Fields)
| * | | | keys: remove libsecp256k1 verification until it's actually supportedCory Fields2015-03-023-38/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | This was added a while ago for testing purposes, but was never intended to be used. Remove it until upstream libsecp256k1 decides that verification is stable/ready.
* | | | Merge pull request #5832Pieter Wuille2015-03-011-3/+0
|\ \ \ \ | | | | | | | | | | | | | | | 9abbeea Remove obsolete pubsub method definitions (Pieter Wuille)
| * | | | Remove obsolete pubsub method definitionsPieter Wuille2015-02-261-3/+0
| | | | |
* | | | | Merge pull request #5694Wladimir J. van der Laan2015-02-261-16/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 25cf6f3 minor rework of SendMoney in rpcwallet (Philip Kaufmann)
| * | | | | minor rework of SendMoney in rpcwalletPhilip Kaufmann2015-02-041-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rework the function to not log errors but use throw JSONRPCError - remove a check for IsLocked() that is done in sendtoaddress and sendfrom RPC calls already - cache GetBalance() return value, because it's possibly used twice
* | | | | | Merge pull request #5820Wladimir J. van der Laan2015-02-261-12/+10
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | 85da07a Better fingerprinting protection for non-main-chain getdatas. (Pieter Wuille)
| * | | | | Better fingerprinting protection for non-main-chain getdatas.Pieter Wuille2015-02-241-12/+10
| | |/ / / | |/| | | | | | | | | | | | | | | | | | With headers-first we can compare against the best header timestamp, rather than using checkpoints which require code updates to maintain.
* | | | | Merge pull request #5801Wladimir J. van der Laan2015-02-261-10/+10
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | de5403f [GUI] Move fee dialog minimise button away from "Transaction Fee" (Michael Ford)
| * | | | [GUI] Move fee dialog minimise button away from "Transaction Fee"Michael Ford2015-02-211-10/+10
| | | | | | | | | | | | | | | | | | | | Its original placement was causing confusion among some users.
* | | | | WIN32 Seed Cleanup: Move nLastPerfmon behind win32 ifdef.21E142015-02-251-3/+4
| |/ / / |/| | | | | | | | | | | | | | | Code to avoid calling Perfmon too often is only needed when perfmon is actually going to get called. This is not intended to make any functional difference in the addition of entropy to the random pool.
* | | | Merge #5706: fix crash: RPC \Wladimir J. van der Laan2015-02-201-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | e5d9d77 fix crash: createmultisig and addmultisigaddress (fsb4000)
| * | | | fix crash: createmultisig and addmultisigaddressfsb40002015-01-251-0/+2
| | | | |
* | | | | Merge #5689: openssl: abstract out OPENSSL_cleanseWladimir J. van der Laan2015-02-1913-17/+44
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 1630219 openssl: abstract out OPENSSL_cleanse (Cory Fields)
| * | | | | openssl: abstract out OPENSSL_cleanseCory Fields2015-02-1513-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier for us to replace it if desired, since it's now only in one spot. Also, it avoids the openssl include from allocators.h, which essentially forced openssl to be included from every compilation unit.
* | | | | | Merge #5366: No longer check osx compatibility in RenameThreadWladimir J. van der Laan2015-02-181-6/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 850c570 No longer check osx compatibility in RenameThread (Michael Ford)
| * | | | | | No longer check osx compatibility in RenameThreadMichael Ford2014-11-251-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 10.5 support has been dropped for some time now.
* | | | | | | Merge #5799: Rename Interval() to DifficultyAdjustmentInterval()Wladimir J. van der Laan2015-02-183-6/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e5ece05 Rename Interval() to DifficultyAdjustmentInterval() (Shaul Kfir)
| * | | | | | | Rename Interval() to DifficultyAdjustmentInterval()Shaul Kfir2015-02-173-6/+6
| | |_|_|/ / / | |/| | | | |
* | | | | | | Merge #5784: Fix usage of NegateSignatureS in script_testsWladimir J. van der Laan2015-02-183-4/+20
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | 78c6bed Add test for DER-encoding edge case (Suhas Daftuar) 6f50dbd Fix NegateSignatureS to not duplicate last byte of S (Suhas Daftuar)
| * | | | | | Add test for DER-encoding edge caseSuhas Daftuar2015-02-103-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix to NegateSignatureS caused a test which had been failing in IsValidSignatureEncoding to then fail in IsLowDERSignature. Add new test so the original check remains exercised.
| * | | | | | Fix NegateSignatureS to not duplicate last byte of SSuhas Daftuar2015-02-103-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NegateSignatureS is called with a signature without a hashtype, so do not save the last byte and append it after S negation. Updates the two tests which were affected by this bug.
* | | | | | | Merge #5710: Add more information to errors in ReadBlockFromDiskPieter Wuille2015-02-162-4/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | f5791c6 Add more information to errors in ReadBlockFromDisk (Wladimir J. van der Laan)
| * | | | | | | Add more information to errors in ReadBlockFromDiskWladimir J. van der Laan2015-02-052-4/+11
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of times, disk corruption problems appear here. To facilitate debugging and troubleshooting, add position information to the error messages.