aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
Commit message (Collapse)AuthorAgeFilesLines
* Introduce BlockMap type for mapBlockIndexPieter Wuille2014-09-041-1/+2
|
* Merge pull request #4808Pieter Wuille2014-09-031-10/+8
|\ | | | | | | | | 3f6540a Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODS (Pieter Wuille) 47eb765 Serializer simplifications after IMPLEMENT_SERIALIZE overhaul (Pieter Wuille)
| * Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODSPieter Wuille2014-09-021-7/+7
| |
| * Serializer simplifications after IMPLEMENT_SERIALIZE overhaulPieter Wuille2014-09-011-3/+1
| |
* | Use OR of respective block flags for masksPieter Wuille2014-09-021-3/+4
|/
* Merge pull request #4737Pieter Wuille2014-09-011-16/+37
|\ | | | | | | | | | | | | 31e9a83 Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille) 84881f8 rework overhauled serialization methods to non-static (Kamil Domanski) 5d96b4a remove fields of ser_streamplaceholder (Kamil Domanski) 3d796f8 overhaul serialization code (Kamil Domanski)
| * Use CSizeComputer to avoid counting sizes in SerializationOpPieter Wuille2014-08-311-27/+8
| |
| * rework overhauled serialization methods to non-staticKamil Domanski2014-08-311-56/+56
| | | | | | | | | | | | | | Thanks to Pieter Wuille for most of the work on this commit. I did not fixup the overhaul commit, because a rebase conflicted with "remove fields of ser_streamplaceholder". I prefer not to risk making a mistake while resolving it.
| * overhaul serialization codeKamil Domanski2014-08-311-49/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of each class' serialization/deserialization is no longer passed within a macro. The implementation now lies within a template of form: template <typename T, typename Stream, typename Operation> inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) { size_t nSerSize = 0; /* CODE */ return nSerSize; } In cases when codepath should depend on whether or not we are just deserializing (old fGetSize, fWrite, fRead flags) an additional clause can be used: bool fRead = boost::is_same<Operation, CSerActionUnserialize>(); The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize, Serialize and Unserialize. These are now wrappers around the "SerializationOp" template.
* | Merge pull request #4779Wladimir J. van der Laan2014-09-011-1/+1
|\ \ | | | | | | | | | 093303a add missing header end comments (Philip Kaufmann)
| * | add missing header end commentsPhilip Kaufmann2014-08-281-1/+1
| | | | | | | | | | | | | | | | | | - ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
* | | Merge pull request #4768Wladimir J. van der Laan2014-09-011-1/+1
|\ \ \ | |_|/ |/| | | | | 2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
| * | Perform CVerifyDB on pcoinsdbview instead of pcoinsTipWladimir J. van der Laan2014-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Move CMerkleTx to wallet.cpp/hWladimir J. van der Laan2014-08-291-60/+0
| | | | | | | | | | | | It is only used by the wallet so it has no place in main.
* | | Fix a few "Uninitialized scalar field" warningsWladimir J. van der Laan2014-08-281-2/+2
| |/ |/| | | | | | | | | Fix a few warnings reported by Coverity. None of these is critical, but making sure that class fields are initialized can avoid heisenbugs.
* | Merge pull request #4377Pieter Wuille2014-08-271-13/+2
|\ \ | | | | | | | | | | | | | | | 654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
| * | Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits)jtimon2014-08-231-11/+2
| | |
| * | Move UpdateTime to powjtimon2014-08-231-2/+0
| | |
* | | Merge pull request #4764Pieter Wuille2014-08-271-1/+1
|\ \ \ | |_|/ |/| | | | | 92bb6f2 Bypass reloading blocks from disk (Pieter Wuille)
| * | Bypass reloading blocks from diskPieter Wuille2014-08-261-1/+1
| |/
* | Merge pull request #4748Pieter Wuille2014-08-261-61/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | move functions in main and net to implementation filesWladimir J. van der Laan2014-08-261-61/+3
| |/
* / Use const CCoinsView's at some places.Daniel Kraft2014-08-261-3/+3
|/ | | | | At some places where it is possible (e. g., CheckInputs), use a const version of CCoinsView instead of a non-const one.
* Remove all other print() methodsWladimir J. van der Laan2014-08-201-10/+0
| | | | All unused.
* Reapply: Reject transactions with excessive numbers of sigopsPeter Todd2014-08-131-0/+2
| | | | | | Reverting was based on a misunderstanding, it appears. Github-Pull: #4150
* Revert "Reject transactions with excessive numbers of sigops"Wladimir J. van der Laan2014-08-121-2/+0
| | | | This reverts commit 4fad8e6d831729efa1965fa2034e7e51d3d0a1be.
* Merge pull request #4150Wladimir J. van der Laan2014-08-121-0/+2
|\ | | | | | | 4fad8e6 Reject transactions with excessive numbers of sigops (Peter Todd)
| * Reject transactions with excessive numbers of sigopsPeter Todd2014-07-131-0/+2
| |
* | Implement "getchaintips" RPC command to monitor blockchain forks.Daniel Kraft2014-08-031-1/+1
| | | | | | | | | | | | | | | | 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.
* | Rework block processing benchmark codePieter Wuille2014-07-271-1/+0
| | | | | | | | | | | | * 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.
* | Revert "Relay double-spends, subject to anti-DOS"Wladimir J. van der Laan2014-07-211-3/+0
| | | | | | | | This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
* | Revert "Remove signal DoubleSpendDetected, use function"Wladimir J. van der Laan2014-07-211-2/+2
| | | | | | | | This reverts commit 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9.
* | Introduce option to disable relay/mining of bare multisig scripts in TX outputsJeff Garzik2014-07-181-0/+1
| | | | | | | | | | | | | | | | 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.
* | getblocktemplate: longpolling supportLuke Dashjr2014-07-111-0/+2
|/
* Merge pull request #4457Wladimir J. van der Laan2014-07-071-13/+7
|\ | | | | | | 834e46e CBlockIndex()::SetNull() method to avoid code repetition (jtimon)
| * CBlockIndex()::SetNull() method to avoid code repetitionjtimon2014-07-021-13/+7
| |
* | Merge pull request #4450Wladimir J. van der Laan2014-07-041-2/+2
|\ \ | | | | | | | | | | | | 0da6b3f Remove signal DoubleSpendDetected, use function (Tom Harding) 88dd359 Check signatures before respend relay (Tom Harding)
| * | Remove signal DoubleSpendDetected, use functionTom Harding2014-07-021-2/+2
| |/ | | | | | | Also removes the need for forward reference to RelayableRespend.
* | Move fee policy out of coreGavin Andresen2014-07-031-0/+1
| |
* | Sanity checks for estimatesGavin Andresen2014-07-031-1/+1
| | | | | | | | | | | | | | Require at least 11 samples before giving fee/priority estimates. And have wallet-created transactions go throught the fee-sanity-check code path.
* | Use fee/priority estimates in wallet CreateTransactionGavin Andresen2014-07-031-8/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | The wallet now uses the mempool fee estimator with a new command-line option: -txconfirmtarget (default: 1) instead of using hard-coded fees or priorities. A new bitcoind that hasn't seen enough transactions to estimate will fall back to the old hard-coded minimum priority or transaction fee. -paytxfee option overrides -txconfirmtarget. Relaying and mining code isn't changed. For Qt, the coin control dialog now uses priority estimates to label transaction priority (instead of hard-coded constants); unspent outputs were consistently labeled with a much higher priority than is justified by the free transactions actually being accepted into blocks. I did not implement any GUI for setting -txconfirmtarget; I would suggest getting rid of the "Pay transaction fee" GUI and replace it with either "target number of confirmations" or maybe a "faster confirmation <--> lower fee" slider or select box.
* Merge pull request #3883 from dgenr8/first_double_spendGavin Andresen2014-06-301-0/+3
|\ | | | | Relay and alert user to double spends
| * Relay double-spends, subject to anti-DOSTom Harding2014-06-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows network wallets and other clients to see transactions that respend a prevout already spent in an unconfirmed transaction in this node's mempool. Knowledge of an attempted double-spend is of interest to recipients of the first spend. In some cases, it will allow these recipients to withhold goods or services upon being alerted of a double-spend that deprives them of payment. As before, respends are not added to the mempool. Anti-Denial-of-Service-Attack provisions: - Use a bloom filter to relay only one respend per mempool prevout - Rate-limit respend relays to a default of 100 thousand bytes/minute - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered - Do not relay these equivalent transactions Remove an unused variable declaration in txmempool.cpp.
* | Add a skiplist to the CBlockIndex structure.Pieter Wuille2014-06-291-1/+11
| | | | | | | | | | This allows fast (O(log n)) access to far predecessor blocks. Use it to speed up CChain::FindFork and CChain::GetLocator.
* | Track peers' available blocksPieter Wuille2014-06-291-0/+1
|/
* Merge pull request #4365 from gavinandresen/relax_isstandardGavin Andresen2014-06-271-0/+2
|\ | | | | Relax IsStandard rules for pay-to-script-hash transactions
| * Relax IsStandard rules for pay-to-script-hash transactionsGavin Andresen2014-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Relax the AreInputsStandard() tests for P2SH transactions -- allow any Script in a P2SH transaction to be relayed/mined, as long as it has 15 or fewer signature operations. Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247 I don't have an easy way to test this, but the code changes are straightforward and I've updated the AreInputsStandard unit tests.
* | Refactor proof of work related functions out of mainjtimon2014-06-231-10/+0
|/
* build: fix build weirdness after 54372482.Cory Fields2014-06-231-1/+1
| | | | | | | | | | | | | bitcoin-config.h moved, but the old file is likely to still exist when reconfiguring or switching branches. This would've caused files to not rebuild correctly, and other strange problems. Make the path explicit so that the old one cannot be found. Core libs use config/bitcoin-config.h. Libs (like crypto) which don't want access to bitcoin's headers continue to use -Iconfig and #include bitcoin-config.h.
* Code simplifications after CTransaction::GetHash() cachingPieter Wuille2014-06-221-3/+3
|