aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
AgeCommit message (Collapse)Author
2014-09-17Merge pull request #4555Wladimir J. van der Laan
6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon) 2b23a87 Don't pass nHashType to VerifyScript (jtimon) ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon) 358562b Remove unused function main:VerifySignature (jtimon)
2014-09-16Merge pull request #4875Pieter Wuille
f7e3637 Eliminate extra assignment (Suhas Daftuar) ec7eb0f When reindexing check for file before trying to open (refactored) (Suhas Daftuar)
2014-09-12Remove CScriptCheck::nHashType (was always 0)jtimon
2014-09-12Remove unused function main:VerifySignaturejtimon
2014-09-10Store fewer orphan tx by default, add -maxorphantx optionGavin Andresen
There is no reason to store thousands of orphan transactions; normally an orphan's parents will either be broadcast or mined reasonably quickly. This pull drops the maximum number of orphans from 10,000 down to 100, and adds a command-line option (-maxorphantx) that is just like -maxorphanblocks to override the default.
2014-09-10When reindexing check for file before trying to open (refactored)Suhas Daftuar
2014-09-08Separate script/standardjtimon
2014-09-08Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes)jtimon
2014-09-04Use boost::unordered_map for mapBlockIndexPieter Wuille
2014-09-04Introduce BlockMap type for mapBlockIndexPieter Wuille
2014-09-03Merge pull request #4808Pieter Wuille
3f6540a Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODS (Pieter Wuille) 47eb765 Serializer simplifications after IMPLEMENT_SERIALIZE overhaul (Pieter Wuille)
2014-09-02Use OR of respective block flags for masksPieter Wuille
2014-09-02Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODSPieter Wuille
2014-09-01Serializer simplifications after IMPLEMENT_SERIALIZE overhaulPieter Wuille
2014-09-01Merge pull request #4737Pieter Wuille
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)
2014-09-01Merge pull request #4779Wladimir J. van der Laan
093303a add missing header end comments (Philip Kaufmann)
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-31Use CSizeComputer to avoid counting sizes in SerializationOpPieter Wuille
2014-08-31rework overhauled serialization methods to non-staticKamil Domanski
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.
2014-08-31overhaul serialization codeKamil Domanski
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.
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-28add missing header end commentsPhilip Kaufmann
- 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
2014-08-28Fix a few "Uninitialized scalar field" warningsWladimir J. van der Laan
Fix a few warnings reported by Coverity. None of these is critical, but making sure that class fields are initialized can avoid heisenbugs.
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-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-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-23Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits)jtimon
2014-08-23Move UpdateTime to powjtimon
2014-08-20Remove all other print() methodsWladimir J. van der Laan
All unused.
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-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-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-21Revert "Relay double-spends, subject to anti-DOS"Wladimir J. van der Laan
This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
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-13Reject transactions with excessive numbers of sigopsPeter Todd
2014-07-11getblocktemplate: longpolling supportLuke Dashjr
2014-07-07Merge pull request #4457Wladimir J. van der Laan
834e46e CBlockIndex()::SetNull() method to avoid code repetition (jtimon)
2014-07-04Merge pull request #4450Wladimir J. van der Laan
0da6b3f Remove signal DoubleSpendDetected, use function (Tom Harding) 88dd359 Check signatures before respend relay (Tom Harding)
2014-07-03Move fee policy out of coreGavin Andresen
2014-07-03Sanity checks for estimatesGavin Andresen
Require at least 11 samples before giving fee/priority estimates. And have wallet-created transactions go throught the fee-sanity-check code path.
2014-07-03Use fee/priority estimates in wallet CreateTransactionGavin Andresen
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.
2014-07-02CBlockIndex()::SetNull() method to avoid code repetitionjtimon
2014-07-02Remove signal DoubleSpendDetected, use functionTom Harding
Also removes the need for forward reference to RelayableRespend.