aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-7/+17
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Refactor: CTxMempool class to its own txmempool.{cpp,h}Gavin Andresen2013-11-041-4/+4
|
* Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ | | | | | | db0e8cc Bump Year Number to 2013 (super3)
| * Bump Year Number to 2013super32013-10-201-1/+1
| |
* | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-10/+7
|/
* Support absence of wallet (pwalletMain==NULL) in several locations,Jeff Garzik2013-10-011-1/+12
| | | | notably RPC.
* Merge pull request #2888 from litecoin-project/getnetworkhashpsJeff Garzik2013-10-011-0/+54
|\ | | | | Add getnetworkhashps to get the estimated network hashrate
| * Add getnetworkhashps to get the calculated network hashratecoblee2013-09-171-0/+54
| |
* | RPC: getblocktemplate does not require a key, to create a block templateJeff Garzik2013-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | getblocktemplate only uses certain portions of the coinbase transaction, notably ignoring the coinbase TX output entirely. Use CreateNewBlock() rather than CreateNewBlockWithKey(), eliminating the needless key passing. Should be zero behavior changes.
* | CreateNewBlock() now takes scriptPubKey argument,Jeff Garzik2013-08-241-2/+2
|/ | | | | | | rather than a key. CreateNewBlockWithKey() helper is added to restore existing functionality, making this an equivalent-transformation change.
* Move internal miner/block creation to separate miner.cpp module.Jeff Garzik2013-07-311-0/+1
| | | | Public functions referenced elsewhere are added to miner.h.
* main.h->core.h include dependency improvements.Jeff Garzik2013-06-241-1/+0
|
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-1/+2
| | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* Moved UpdateTime out of CBlockHeader and moved CBlockHeader into core.Eric Lombrozo2013-06-051-2/+2
|
* remove GetBoolArg() fDefault parameter defaulting to falsePhilip Kaufmann2013-06-011-11/+11
| | | | | | | | - explicitly set the default of all GetBoolArg() calls - rework getarg_test.cpp and util_tests.cpp to cover this change - some indentation fixes - move macdockiconhandler.h include in bitcoin.cpp to the "our headers" section
* Move pMiningKey init out of StartRPCThreadsWladimir J. van der Laan2013-05-301-0/+15
| | | | | | | | | | This commit decouples the pMiningKey initialization and shutdown from the RPC threads. `getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran from the debug window in the UI even when the RPC server is not running. Solves issue #2706.
* Clean up mining CReserveKey to prevent crash at shutdownGavin Andresen2013-05-231-6/+3
| | | | Fixes issue#2687
* Do not use C++11 std::vector.data()Gavin Andresen2013-02-071-1/+1
| | | | std::vector.data() is a C++11 feature that makes my OSX build machine unhappy.
* CValidationState frameworkPieter Wuille2013-01-301-2/+3
|
* moved "index_in_template" to a separate variable to clarify what it isForrest Voight2013-01-031-2/+3
|
* use fee/sigop data in BlockTemplate struct instead of (not always correctly) ↵Forrest Voight2012-12-191-8/+2
| | | | calculating it ourselves
* changed CreateNewBlock to return a CBlockTemplate object, which includes ↵Forrest Voight2012-12-191-14/+16
| | | | per-tx fee and sigop count data
* Don't force getblocktemplate to have a parameter.Gregory Maxwell2012-10-241-1/+1
| | | | | This looks like it was just a munged merge when ultraprune was committed.
* Batch block connection during IBDPieter Wuille2012-10-201-3/+1
| | | | | | | During the initial block download (or -loadblock), delay connection of new blocks a bit, and perform them in a single action. This reduces the load on the database engine, as subsequent blocks often update an earlier block's transaction already.
* UltraprunePieter Wuille2012-10-201-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches bitcoin's transaction/block verification logic to use a "coin database", which contains all unredeemed transaction output scripts, amounts and heights. The name ultraprune comes from the fact that instead of a full transaction index, we only (need to) keep an index with unspent outputs. For now, the blocks themselves are kept as usual, although they are only necessary for serving, rescanning and reorganizing. The basic datastructures are CCoins (representing the coins of a single transaction), and CCoinsView (representing a state of the coins database). There are several implementations for CCoinsView. A dummy, one backed by the coins database (coins.dat), one backed by the memory pool, and one that adds a cache on top of it. FetchInputs, ConnectInputs, ConnectBlock, DisconnectBlock, ... now operate on a generic CCoinsView. The block switching logic now builds a single cached CCoinsView with changes to be committed to the database before any changes are made. This means no uncommitted changes are ever read from the database, and should ease the transition to another database layer which does not support transactions (but does support atomic writes), like LevelDB. For the getrawtransaction() RPC call, access to a txid-to-disk index would be preferable. As this index is not necessary or even useful for any other part of the implementation, it is not provided. Instead, getrawtransaction() uses the coin database to find the block height, and then scans that block to find the requested transaction. This is slow, but should suffice for debug purposes.
* Document RPC error codesWladimir J. van der Laan2012-10-041-10/+10
| | | | Replace all "magic values" in RPCError(...) by constants.
* Merge pull request #1771 from luke-jr/bugfix_bip22_modeJeff Garzik2012-09-011-0/+4
|\ | | | | Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided
| * Bugfix: getblocktemplate: Accept optional "mode" parameter not being providedLuke Dashjr2012-09-011-0/+4
| |
* | RPC, cosmetic: move more RPC code to new rpcblockchain.cpp moduleJeff Garzik2012-08-211-3/+0
| |
* | RPC: submitblock returns null on success, string on errorJeff Garzik2012-08-211-2/+2
|/
* RPC, cosmetic: Create rpcmining.cpp as new home for mining-related RPC codeJeff Garzik2012-08-211-0/+380