aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2015-08-05Merge pull request #5913Wladimir J. van der Laan
5922b67 Add assertion and cast before sending reject code (Wladimir J. van der Laan) a651403 Add absurdly high fee message to validation state (for RPC propagation) (Shaul Kfir)
2015-08-05Add assertion and cast before sending reject codeWladimir J. van der Laan
This gets rid of a warning. Add an assertion to make sure that the reject code is in the correct range for the network protocol (if it is outside the range it must be a bug)
2015-08-05Merge pull request #6462Wladimir J. van der Laan
7b79cbd limit total length of user agent comments (Pavol Rusnak) 557f8ea implement uacomment config parameter which can add comments to user agent as per BIP-0014 (Pavol Rusnak)
2015-08-05limit total length of user agent commentsPavol Rusnak
Reworked-By: Wladimir J. van der Laan <laanwj@gmail.com>
2015-08-03Merge pull request #6498Wladimir J. van der Laan
a8d0407 Move recentRejects initialization to top of InitBlockIndex (Wladimir J. van der Laan) 0847d9c Keep track of recently rejected transactions (Peter Todd) d741371 Only use randomly created nonces in CRollingBloomFilter. (Pieter Wuille) d2d7ee0 Make CRollingBloomFilter set nTweak for you (Peter Todd) a3d65fe Reuse vector hashing code for uint256 (Pieter Wuille) bbe4108 Add uint256 support to CRollingBloomFilter (Peter Todd)
2015-08-03Make sure LogPrintf strings are line-terminatedWladimir J. van der Laan
Fix the cases where LogPrint[f] was accidentally called without line terminator, which resulted in concatenated log lines. (see e.g. #6492)
2015-07-31Move recentRejects initialization to top of InitBlockIndexWladimir J. van der Laan
This avoids that premature return in the condition that a new chain is initialized results in NULL pointer errors due to recentReject not being constructed. Also add assertions where it is used.
2015-07-29Merge pull request #6224Wladimir J. van der Laan
59b49cd Eliminate signed/unsigned comparison warning (Suhas Daftuar) 04b5d23 Replace sleep with syncing using pings (Suhas Daftuar) 6b1066f Ignore whitelisting during IBD for unrequested blocks. (Suhas Daftuar) bfc30b3 Ignore unrequested blocks too far ahead of tip (Suhas Daftuar)
2015-07-28Keep track of recently rejected transactionsPeter Todd
Nodes can have divergent policies on which transactions they will accept and relay. This can cause you to repeatedly request and reject the same tx after its inved to you from various peers which have accepted it. Here we add rolling bloom filter to keep track of such rejections, clearing the filter every time the chain tip changes. Credit goes to Alex Morcos, who created the patch that this code is based on. Original code by Peter Todd. Refactored to not construct the filter at startup time by Pieter Wuille.
2015-07-28Revert "Cache transaction validation successes"Pieter Wuille
This reverts commit 17b11428c135203342aff38cabc8047e673f38ac.
2015-07-27Make CRollingBloomFilter set nTweak for youPeter Todd
While CBloomFilter is usually used with an explicitly set nTweak, CRollingBloomFilter is only used internally. Requiring every caller to set nTweak is error-prone and redundant; better to have the class handle that for you with a high-quality randomness source. Additionally when clearing the filter it makes sense to change nTweak as well to recover from a bad setting, e.g. due to insufficient randomness at initialization, so the clear() method is replaced by a reset() method that sets a new, random, nTweak value.
2015-07-27Cache transaction validation successesPieter Wuille
2015-07-27Merge pull request #5697Wladimir J. van der Laan
60c8bac Includes: Cleanup around net main and wallet (Jorge Timón) 9dd793f TRIVIAL: Missing includes (Jorge Timón)
2015-07-23Includes: Cleanup around net main and walletJorge Timón
-Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
2015-07-23TRIVIAL: Missing includesJorge Timón
2015-07-23Merge pull request #6287Wladimir J. van der Laan
a794284 locking: add a quick example of GUARDED_BY (Cory Fields) 2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields) cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
2015-07-16remove unused inv from ConnectTip()Pavel Vasin
2015-07-11Eliminate signed/unsigned comparison warningSuhas Daftuar
2015-07-06Merge pull request #6335Wladimir J. van der Laan
9238ecb Policy: MOVEONLY: 3 functions to policy.o: (Luke Dashjr) 627b9de Policy: MOVEONLY: Create policy/policy.h with some constants (Jorge Timón)
2015-07-03Merge pull request #6329Wladimir J. van der Laan
0c37634 acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke Dashjr)
2015-07-03acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for ↵Luke Dashjr
testnet/regtest only
2015-07-02use CBanEntry as object container for banned nodesJonas Schnelli
- added a reason enum for a ban - added creation time for a ban Using CBanEntry as container will keep banlist.dat extenable.
2015-06-30Add absurdly high fee message to validation state (for RPC propagation)Shaul Kfir
2015-06-30Ignore whitelisting during IBD for unrequested blocks.Suhas Daftuar
2015-06-26Policy: MOVEONLY: 3 functions to policy.o:Luke Dashjr
- [script/standard.o] IsStandard - [main.o] IsStandardTx - [main.o] AreInputsStandard Also, don't use namespace std in policy.cpp
2015-06-26Policy: MOVEONLY: Create policy/policy.h with some constantsJorge Timón
2015-06-26Merge pull request #6299Wladimir J. van der Laan
4f40716 test: Move reindex test to standard tests (Wladimir J. van der Laan) 36c97b4 Bugfix: Don't check the genesis block header before accepting it (Jorge Timón)
2015-06-25Merge pull request #6233Wladimir J. van der Laan
3e91433 Advance pindexLastCommonBlock for blocks in chainActive (Suhas Daftuar)
2015-06-21Bugfix: Don't check the genesis block header before accepting itJorge Timón
This fixes an error triggered when running with -reindex after #5975
2015-06-16locking: add a quick example of GUARDED_BYCory Fields
This was chosen not because it's necessarily helpful, but because its locking assumptions were already correct.
2015-06-15Merge pull request #6274Wladimir J. van der Laan
02a6702 Add option `-alerts` to opt out of alert system (Wladimir J. van der Laan)
2015-06-15Add option `-alerts` to opt out of alert systemWladimir J. van der Laan
Make it possible to opt-out of the centralized alert system by providing an option `-noalerts` or `-alerts=0`. The default remains unchanged. This is a gentler form of #6260, in which I went a bit overboard by removing the alert system completely. I intend to add this to the GUI options in another pull after this.
2015-06-12Merge pull request #6256Wladimir J. van der Laan
65b9454 Use best header chain timestamps to detect partitioning (Gavin Andresen)
2015-06-11Merge pull request #6221Wladimir J. van der Laan
c257a8c Prune: Support noncontiguous block files (Adam Weiss)
2015-06-10Merge pull request #6061Wladimir J. van der Laan
eb83719 Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs (Jorge Timón)
2015-06-10Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in ↵Jorge Timón
CheckInputs
2015-06-10Consensus: Separate CheckIndexAgainstCheckpoint() from ↵Jorge Timón
ContextualCheckBlockHeader
2015-06-10Merge pull request #5985Wladimir J. van der Laan
14d4eef Fix removing of orphan transactions (Alex Morcos)
2015-06-10Merge pull request #5927Wladimir J. van der Laan
dce8360 Reduce checkpoints' effect on consensus. (Pieter Wuille)
2015-06-08Use best header chain timestamps to detect partitioningGavin Andresen
The partition checking code was using chainActive timestamps to detect partitioning; with headers-first syncing, it should use (and with this pull request, does use) pIndexBestHeader timestamps. Fixes issue #6251
2015-06-04use const references where appropriatePhilip Kaufmann
2015-06-04Advance pindexLastCommonBlock for blocks in chainActiveSuhas Daftuar
This prevents an edge case where a block downloaded and pruned in-between successive calls to FindNextBlocksToDownload could cause the block to be unnecessarily re-requested.
2015-06-03Prune: Support noncontiguous block filesAdam Weiss
In some corner cases, it may be possible for recent blocks to end up in the same block file as much older blocks. Previously, the pruning code would stop looking for files to remove upon first encountering a file containing a block that cannot be pruned, now it will keep looking for candidate files until the target is met and all other criteria are satisfied. This can result in a noncontiguous set of block files (by number) on disk, which is fine except for during some reindex corner cases, so make reindex preparation smarter such that we keep the data we can actually use and throw away the rest. This allows pruning to work correctly while downloading any blocks needed during the reindex.
2015-06-03Ignore unrequested blocks too far ahead of tipSuhas Daftuar
2015-06-02Be stricter in processing unrequested blocksSuhas Daftuar
AcceptBlock will no longer process an unrequested block, unless it has not been previously processed and has more work than chainActive.Tip()
2015-06-02Merge pull request #6172Wladimir J. van der Laan
a1ba077 Ignore getheaders requests when not synced. (Suhas Daftuar)
2015-06-01Merge pull request #6183Wladimir J. van der Laan
28bf062 Fix off-by-one error w/ nLockTime in the wallet (Peter Todd)
2015-06-01Merge pull request #6195Wladimir J. van der Laan
8273793 Eliminate compiler warning due to unused variable (Suhas Daftuar)
2015-05-27Eliminate compiler warning due to unused variableSuhas Daftuar
2015-05-27Ignore getheaders requests when not synced.Suhas Daftuar