aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2014-09-08Move CBlockIndex, CChain and related code out of mainjtimon
2014-09-08Decouple CChain from mapBlockIndexjtimon
2014-09-08Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrevWladimir J. van der Laan
2014-09-06Cleanup messy error messagesR E Broadley
2014-09-04Introduce BlockMap type for mapBlockIndexPieter Wuille
2014-09-04checkpoints.cpp depends on main, it can use mapBlockIndex directlyPieter Wuille
2014-09-03Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.Pieter Wuille
The efficient version of CCoinsViewCache::GetCoins only works for known-to-exist cache entries, requiring a separate HaveCoins call beforehand. This is inefficient as both perform a hashtable lookup. Replace the non-mutable GetCoins with AccessCoins, which returns a potentially-NULL pointer. This also decreases the overloading of GetCoins. Also replace some copying (inefficient) GetCoins calls with equivalent AccessCoins, decreasing the copying.
2014-09-01Merge pull request #4768Wladimir J. van der Laan
2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
2014-08-31Move g_signals.SetBestChain(..) below SyncWithWalletsCozz Lovan
2014-08-29Merge pull request #4778Jeff Garzik
2014-08-29Merge pull request #4599Jeff Garzik
2014-08-29Move CMerkleTx to wallet.cpp/hWladimir J. van der Laan
It is only used by the wallet so it has no place in main.
2014-08-27Merge pull request #4377Pieter Wuille
654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
2014-08-27Merge pull request #4764Pieter Wuille
92bb6f2 Bypass reloading blocks from disk (Pieter Wuille)
2014-08-27Revert "Add a getutxos command to the p2p protocol. It allows querying of ↵Wladimir J. van der Laan
the UTXO set" This reverts commit da2ec100f3681176f60dec6dc675fc64147ade3a.
2014-08-27Perform CVerifyDB on pcoinsdbview instead of pcoinsTipWladimir J. van der Laan
Bypassing the main coins cache allows more thorough checking with the same memory budget. This has no effect on performance because everything ends up in the child cache created by VerifyDB itself. It has bugged me ever since #4675, which effectively reduced the number of checked blocks to reduce peak memory usage. - Pass the coinsview to use as argument to VerifyDB - This also avoids that the first `pcoinsTip->Flush()` after VerifyDB writes a large slew of unchanged coin records back to the database.
2014-08-26Merge pull request #4748Pieter Wuille
ad49c25 Split up util.cpp/h (Wladimir J. van der Laan) f841aa2 Move `COIN` and `CENT` to core.h (Wladimir J. van der Laan) 6e5fd00 Move `*Version()` functions to version.h/cpp (Wladimir J. van der Laan) b4aa769 Move `S_I*` constants and `MSG_NOSIGNAL` to compat.h (Wladimir J. van der Laan) af8297c Move functions in wallet.h to implementation file (Wladimir J. van der Laan) 651480c move functions in main and net to implementation files (Wladimir J. van der Laan) 610a8c0 Move SetThreadPriority implementation to util.cpp instead of the header (Wladimir J. van der Laan) f780e65 Remove unused function `ByteReverse` from util.h (Wladimir J. van der Laan) 121d6ad Remove unused `alignup` function from util.h (Wladimir J. van der Laan) d1e26d4 Move CMedianFilter to timedata.cpp (Wladimir J. van der Laan)
2014-08-26Split up util.cpp/hWladimir J. van der Laan
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26move functions in main and net to implementation filesWladimir J. van der Laan
2014-08-26Use const CCoinsView's at some places.Daniel Kraft
At some places where it is possible (e. g., CheckInputs), use a const version of CCoinsView instead of a non-const one.
2014-08-26Bypass reloading blocks from diskPieter Wuille
2014-08-25Merge pull request #4716Wladimir J. van der Laan
0d27dad Clean-up SyncWithWallets/SyncTransaction (Cozz Lovan)
2014-08-25Merge pull request #4351Wladimir J. van der Laan
da2ec10 Add a getutxos command to the p2p protocol. It allows querying of the UTXO set given a set of outpoints. (Mike Hearn)
2014-08-24Merge pull request #4618Pieter Wuille
eb0b56b Simplify serialize.h's exception handling (Pieter Wuille)
2014-08-23replace ComputeMinWork with CheckMinWorkjtimon
2014-08-23Move UpdateTime to powjtimon
2014-08-20Remove all other print() methodsWladimir J. van der Laan
All unused.
2014-08-18Merge pull request #4655Wladimir J. van der Laan
216e9a4 Add a way to limit deserialized string lengths (Pieter Wuille)
2014-08-17Clean-up SyncWithWallets/SyncTransactionCozz Lovan
2014-08-14Create new signal for notification of new blocks. Use w/ -blocknotifyJeff Garzik
2014-08-14ui_interface: remove unused NotifyBlocksChanged signalJeff Garzik
2014-08-13Reapply: Reject transactions with excessive numbers of sigopsPeter Todd
Reverting was based on a misunderstanding, it appears. Github-Pull: #4150
2014-08-12Revert "Reject transactions with excessive numbers of sigops"Wladimir J. van der Laan
This reverts commit 4fad8e6d831729efa1965fa2034e7e51d3d0a1be.
2014-08-12Merge pull request #4150Wladimir J. van der Laan
4fad8e6 Reject transactions with excessive numbers of sigops (Peter Todd)
2014-08-11Add a getutxos command to the p2p protocol. It allows querying of the UTXO setMike Hearn
given a set of outpoints.
2014-08-11Reduce maximum coinscache size during verificationWladimir J. van der Laan
Due to growing coinsviewcaches, the memory usage with checklevel=3 (and standard settings for dbcache) could be up to 500MiB on a 64-bit system. This is about twice the peak during reindexing, unnecessarily extending bitcoind's memory envelope. This commit reduces the maximum total size of the caches used during verification to just nCoinCacheSize, which should be the limit.
2014-08-09Simplify serialize.h's exception handlingPieter Wuille
Remove the 'state' and 'exceptmask' from serialize.h's stream implementations, as well as related methods. As exceptmask always included 'failbit', and setstate was always called with bits = failbit, all it did was immediately raise an exception. Get rid of those variables, and replace the setstate with direct exception throwing (which also removes some dead code). As a result, good() is never reached after a failure (there are only 2 calls, one of which is in tests), and can just be replaced by !eof(). fail(), clear(n) and exceptions() are just never called. Delete them.
2014-08-09Add a way to limit deserialized string lengthsPieter Wuille
and use it for most strings being serialized.
2014-08-04Log "version" message IP addresses in client connect summaryJeff Garzik
The only other method of logging remote addresses is via -logips=1 -debug=net which increases the logged activity by 100x or more. Github-Pull: #4608 Amended-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-08-03Implement "getchaintips" RPC command to monitor blockchain forks.Daniel Kraft
Port over https://github.com/chronokings/huntercoin/pull/19 from Huntercoin: This implements a new RPC command "getchaintips" that can be used to find all currently active chain heads. This is similar to the -printblocktree startup option, but it can be used without restarting just via the RPC interface on a running daemon.
2014-07-31Merge pull request #4497Pieter Wuille
714a3e6 Only keep setBlockIndexValid entries that are possible improvements (Pieter Wuille)
2014-07-27Rework block processing benchmark codePieter Wuille
* Replace -benchmark (and the related fBenchmark) with a regular debug option, -debug=bench. * Increase coverage and granularity of individual block processing steps. * Add cummulative times.
2014-07-24Merge pull request #4496Wladimir J. van der Laan
5734d4d Only remove actualy failed blocks from setBlockIndexValid (Pieter Wuille)
2014-07-21Revert "Relay double-spends, subject to anti-DOS"Wladimir J. van der Laan
This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
2014-07-21Revert "Formatting, spelling, comment fixes."Wladimir J. van der Laan
This reverts commit 7a19efe04069d9a1e251cdc94b25184f76d9d901.
2014-07-21Revert "Check signatures before respend relay"Wladimir J. van der Laan
This reverts commit 88dd3598d22197a22565e524cecdc08107cf76ac.
2014-07-21Revert "Remove signal DoubleSpendDetected, use function"Wladimir J. van der Laan
This reverts commit 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9.
2014-07-18Introduce option to disable relay/mining of bare multisig scripts in TX outputsJeff Garzik
First and foremost, this defaults to OFF. This option lets a node consider such transactions non-standard, meaning they will not be relayed or mined by default, but other miners are free to mine these as usual.
2014-07-17Merge pull request #4533Wladimir J. van der Laan
43005cf Fix semantic typo in state.CorruptionPossible check (kazcw)
2014-07-16Remove tx from AlreadyAskedFor list once we receive it, not when we process it.R E Broadley