aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make mining fee policy match relay fee policy.Mike Hearn2014-03-101-2/+2
| | | | | | This resolves a case in which a mismatch could be used to bloat up the mempool by sending transactions that pay enough fee to relay, but not to be mined, with the default policies.
* Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so we cannot fix this with just macros. Trivial commit: apply the following script to all .cpp and .h files: # Middle sed -i 's/"PRIx64"/x/g' "$1" sed -i 's/"PRIu64"/u/g' "$1" sed -i 's/"PRId64"/d/g' "$1" # Initial sed -i 's/PRIx64"/"x/g' "$1" sed -i 's/PRIu64"/"u/g' "$1" sed -i 's/PRId64"/"d/g' "$1" # Trailing sed -i 's/"PRIx64/x"/g' "$1" sed -i 's/"PRIu64/u"/g' "$1" sed -i 's/"PRId64/d"/g' "$1" After this commit, `git grep` for PRI.64 should turn up nothing except the defines in util.h.
* Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
* Fix off-by-one errors in use of IsFinalTx()Peter Todd2014-01-261-1/+1
| | | | | | | | | | | | | | Previously CreateNewBlock() didn't take into account the fact that IsFinalTx() without any arguments tests if the transaction is considered final in the *current* block, when both those functions really needed to know if the transaction would be final in the *next* block. Additionally the UI had a similar misunderstanding. Also adds some basic tests to check that CreateNewBlock() is in fact mining nLockTime-using transactions correctly. Thanks to Wladimir J. van der Laan for rebase.
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-5/+5
| | | | | | | After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
* Make bitcoin compile without wallet if "db_cxx.h" is not presentThomas Holenstein2013-12-191-1/+2
| | | | | Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove them.
* Merge pull request #3326Wladimir J. van der Laan2013-12-131-1/+1
|\ | | | | | | ad898b4 Increase default -blockmaxsize/prioritysize to 750K/50K (Gavin Andresen)
| * Increase default -blockmaxsize/prioritysize to 750K/50KGavin Andresen2013-11-301-1/+1
| |
* | Move internal miner functionality togetherWladimir J. van der Laan2013-12-091-53/+52
| |
* | Allow mining RPCs with --disable-walletWladimir J. van der Laan2013-12-091-2/+7
| | | | | | | | | | | | | | | | | | | | | | The following mining-related RPC calls don't use the wallet: - getnetworkhashps - getmininginfo - getblocktemplate - submitblock Enable them when compiling with --disable-wallet.
* | Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-21/+10
| | | | | | | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* | Refactor: move GetValueIn(tx) to tx.GetValueIn()Gavin Andresen2013-11-301-2/+2
|/ | | | GetValueIn makes more sense as a CTransaction member.
* setgenerate creates multiple blocks in -regtest modeGavin Andresen2013-11-221-2/+1
| | | | | | | | | | | | | | | I'm writing some wallet regression tests using -regtest mode, and need to generate an initial multi-hundred-block chain. Repeatedly calling setgenerate to generate one block is slow and doesn't work properly, because block creation happens asynchronously. This adds two features to setgenerate in -regtest mode: 1) Instead of being interpreted as number of threads to start, the third argument is the number of blocks to generate. 2) setgenerate will not return until the block creation threads have created the requested number of blocks.
* core: remove includes in .cpp, if header is already in .hPhilip Kaufmann2013-11-151-2/+0
| | | | | - example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-13/+19
| | | | | | | | | 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-2/+2
|
* 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
| |
* | Merge pull request #2945 from gmaxwell/fee-logic_encourage_sweepingGavin Andresen2013-10-191-2/+14
|\ \ | | | | | | [Fee logic] Don't count txins for priority to encourage sweeping.
| * | [Fee logic] Don't count txins for priority to encourage sweeping.Gregory Maxwell2013-09-171-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the priority calculation to not include the size of per-txin data including up to 110 bytes of scriptsig so that transactions which sweep up extra UTXO don't lose priority relative to ones that don't. I'd toyed with some other variations, but it seems like any formulation which results in an incentive stronger than making them not count will sometimes create incentives to add extra outputs so that you have extra inputs to consume later. The maximum credit is limited so that users don't lose the disincentive to stuff random data in their transactions, the limit of 110 is based on the size of a P2SH redemption with a compressed public key. This shouldn't need a staged deployment because the priority is not used as a relay criteria, only a mining criteria.
* | | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-4/+4
| |/ |/|
* | internal miner: move 2 globals from main to minerPhilip Kaufmann2013-09-251-6/+2
| | | | | | | | | | | | - moves 2 global variables from main.cpp/h to miner.cpp/h - also removes 2 unneded includes in miner.cpp, that come from miner.h already
* | Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-12/+12
|/
* miner: constify CreateNewBlock() arg scriptPubKeyInJeff Garzik2013-08-251-1/+1
|
* CreateNewBlock() now takes scriptPubKey argument,Jeff Garzik2013-08-241-6/+12
| | | | | | | 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/+663
Public functions referenced elsewhere are added to miner.h.