aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Chainparams: Refactor: Decouple main::GetBlockValue() from Params() [renamed ↵Jorge Timón2015-05-151-1/+2
|/ | | | | | GetBlockSubsidy] Remove redundant getter CChainParams::SubsidyHalvingInterval()
* Avoid crash on start in TestBlockValidity with gen=1.Gregory Maxwell2015-05-121-1/+14
| | | | | | | | When the internal miner is enabled at the start of a new node, there is an near instant assert in TestBlockValidity because its attempting to mine a block before the top checkpoint. Also avoids a data race around vNodes.
* Consensus: Create consensus/consensus.h with some constantsjtimon2015-04-201-0/+1
|
* Chainparams: Refactor: Remove redundant AllowMinDifficultyBlocks() getterJorge Timón2015-04-151-10/+12
|
* Revert mining changes in #5957Wladimir J. van der Laan2015-04-101-66/+56
| | | | | | | This reverts commit e2edf95cd3f43331843676e49a82830128a95050 6b04508e37c5dd18cec1cd61cc4356bd208aa991 0df67f1f7ab4adfe9f0b3ba6276e737b37826464, except the changes to the RPC tests. A `generate` RPC call is introduced based on the old code.
* Bugfix: make CreateNewBlock return pindexPrevPieter Wuille2015-04-011-8/+8
|
* Introduce separate 'generate' RPC callPieter Wuille2015-04-011-32/+54
|
* Simplify hash loop codePieter Wuille2015-04-011-21/+9
|
* Consensus: Refactor: Decouple pow.o from chainparams.oJorge Timón2015-03-261-2/+2
|
* [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-1/+1
| | | | could once be renamed from /src/wallet to /src/legacywallet.
* Remove whitespaces before double colon in errors and logsPavel Janík2015-01-311-3/+3
|
* Merge pull request #5599Wladimir J. van der Laan2015-01-241-40/+2
|\ | | | | | | 0cc0d8d Get rid of the internal miner's hashmeter (jtimon)
| * Get rid of the internal miner's hashmeterjtimon2015-01-041-40/+2
| |
* | MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h)Luke Dashjr2015-01-121-1/+0
| |
* | Use arith_uint256 where necessaryWladimir J. van der Laan2015-01-051-2/+2
| | | | | | | | Also add conversion from/to uint256 where needed.
* | Remove declaration of no longer existent CheckWorkWladimir J. van der Laan2015-01-021-1/+1
| | | | | | | | | | | | | | Also make ProcessBlockFound static as it is not used outside miner.cpp. Alternative implementation of #5549.
* | Decouple miner.o and txmempool.o from CTxUndojtimon2014-12-271-2/+1
| |
* | Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | | | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* | Merge pull request #5470Wladimir J. van der Laan2014-12-191-1/+1
|\ \ | | | | | | | | | 78253fc Remove references to X11 licence (Michael Ford)
| * | Remove references to X11 licenceMichael Ford2014-12-161-1/+1
| |/
* / make all catch() arguments constPhilip Kaufmann2014-12-171-1/+1
|/ | | | | | | - I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase
* MOVEONLY: core/ -> primitives/Luke Dashjr2014-12-031-2/+2
|
* Merge pull request #1816Wladimir J. van der Laan2014-11-241-11/+8
|\ | | | | | | | | | | | | | | | | | | | | | | b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr) 60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr) bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr) 9765a50 Implement BIP 23 Block Proposal (Luke Dashjr) 3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr) 132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr) df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr) 4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr) a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
| * CreateNewBlock: Stick height in coinbase so we pass template sanity checkLuke Dashjr2014-11-201-5/+6
| |
| * TestBlockValidity function for CBlock proposals (used by CreateNewBlock)Luke Dashjr2014-11-181-15/+2
| |
| * CreateNewBlock and miner_tests: Also check generated template is valid by ↵Luke Dashjr2014-11-181-0/+9
| | | | | | | | CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock
* | Merge pull request #5170Wladimir J. van der Laan2014-11-211-0/+10
|\ \ | |/ |/| | | | | 092b58d CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex) (jtimon) 22c4272 MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include main.h -> chain.h) (jtimon)
| * MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include ↵jtimon2014-10-291-0/+10
| | | | | | | | main.h -> chain.h)
* | Merge pull request #5106Wladimir J. van der Laan2014-11-031-2/+2
|\ \ | |/ |/| | | | | | | | | 1bea2bb Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it (Luke Dashjr) d29a291 Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock (Luke Dashjr) f877aaa Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check (Luke Dashjr) 24e8896 Add CValidationInterface::BlockChecked notification (Luke Dashjr)
| * Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr2014-10-281-2/+2
| | | | | | | | document it
* | MOVEONLY: core.o -> core/block.ojtimon2014-10-271-1/+1
| |
* | MOVEONLY: Separate CTransaction and dependencies from corejtimon2014-10-271-0/+1
| |
* | MOVEONLY: Move CFeeRate and Amount constants to amount.ojtimon2014-10-271-0/+1
| |
* | Merge pull request #4981Wladimir J. van der Laan2014-10-221-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 85c579e script: add a slew of includes all around and drop includes from script.h (Cory Fields) db8eb54 script: move ToString and ValueString out of the header (Cory Fields) e9ca428 script: add ToByteVector() for converting anything with begin/end (Cory Fields) 066e2a1 script: move CScriptID to standard.h and add a ctor for creating them from CScripts (Cory Fields)
| * | script: add ToByteVector() for converting anything with begin/endCory Fields2014-10-171-1/+1
| |/ | | | | | | This should move to a util header once their dependencies are cleaned up.
* / Fixes for missing boost tuple.hpp header include.randy-waterhouse2014-10-211-0/+1
|/
* Merge pull request #5059Gavin Andresen2014-10-091-0/+5
|\ | | | | | | | | | | | | dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen) e01a793 Refactor -alertnotify code (Gavin Andresen) Signed-off-by: Gavin Andresen <[email protected]>
| * Trigger -alertnotify if network is upgrading without youGavin Andresen2014-10-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a -regetest-only undocumented (for regression testing only) command-line option -blockversion=N to set block.nVersion. Adds to the "has the rest of the network upgraded to a block.nVersion we don't understand" code so it calls -alertnotify when 51 of the last 100 blocks are up-version. But it only alerts once, not with every subsequent new, upversion block. And adds a forknotify.py regression test to make sure it works. Tested using forknotify.py: Before adding CAlert::Notify, get: Assertion failed: -alertnotify did not warn of up-version blocks Before adding code to only alert once: Assertion failed: -alertnotify excessive warning of up-version blocks After final code in this pull: Tests successful
* | Merge pull request #4834Pieter Wuille2014-10-081-2/+2
|\ \ | |/ |/| | | | | | | | | | | 7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille) ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille) 058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille) c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille) f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
| * Get rid of the dummy CCoinsViewCache constructor argPieter Wuille2014-09-241-2/+2
| |
* | Replace SCRIPT_VERIFY_NOCACHE by flag directly to checkerPieter Wuille2014-10-021-1/+1
| |
* | Use a typedef for monetary valuesMark Friedenbach2014-09-261-5/+5
|/
* Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.Pieter Wuille2014-09-031-3/+4
| | | | | | | | | | | | 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.
* Merge pull request #4377Pieter Wuille2014-08-271-2/+2
|\ | | | | | | | | | | 654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
| * Move UpdateTime to powjtimon2014-08-231-2/+2
| |
* | Split up util.cpp/hWladimir J. van der Laan2014-08-261-2/+4
|/ | | | | | | | | | | | | | | | 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.
* Remove all other print() methodsWladimir J. van der Laan2014-08-201-8/+0
| | | | All unused.
* Remove print() from core functionsWladimir J. van der Laan2014-08-201-1/+1
| | | | Break dependency on util.
* Simplify and rename CheckWork to ProcessBlockFoundjtimon2014-07-301-11/+4
|
* `getrawchangeaddress` should fail when keypool exhaustedWladimir J. van der Laan2014-07-111-0/+3
| | | | | | | | | | | | An user on IRC reported an issue where `getrawchangeaddress` keeps returning a single address when the keypool is exhausted. In my opinion this is strange behaviour. - Change CReserveKey to fail when running out of keys in the keypool. - Make `getrawchangeaddress` return RPC_WALLET_KEYPOOL_RAN_OUT when unable to create an address. - Add a Python RPC test for checking the keypool behaviour in combination with encrypted wallets.