aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
AgeCommit message (Collapse)Author
2015-01-31Remove whitespaces before double colon in errors and logsPavel Janík
2015-01-24Merge pull request #5599Wladimir J. van der Laan
0cc0d8d Get rid of the internal miner's hashmeter (jtimon)
2015-01-12MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h)Luke Dashjr
2015-01-05Use arith_uint256 where necessaryWladimir J. van der Laan
Also add conversion from/to uint256 where needed.
2015-01-04Get rid of the internal miner's hashmeterjtimon
2015-01-02Remove declaration of no longer existent CheckWorkWladimir J. van der Laan
Also make ProcessBlockFound static as it is not used outside miner.cpp. Alternative implementation of #5549.
2014-12-27Decouple miner.o and txmempool.o from CTxUndojtimon
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19Merge pull request #5470Wladimir J. van der Laan
78253fc Remove references to X11 licence (Michael Ford)
2014-12-17make all catch() arguments constPhilip Kaufmann
- 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
2014-12-16Remove references to X11 licenceMichael Ford
2014-12-03MOVEONLY: core/ -> primitives/Luke Dashjr
2014-11-24Merge pull request #1816Wladimir J. van der Laan
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)
2014-11-21Merge pull request #5170Wladimir J. van der Laan
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)
2014-11-20CreateNewBlock: Stick height in coinbase so we pass template sanity checkLuke Dashjr
2014-11-18TestBlockValidity function for CBlock proposals (used by CreateNewBlock)Luke Dashjr
2014-11-18CreateNewBlock and miner_tests: Also check generated template is valid by ↵Luke Dashjr
CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock
2014-11-03Merge pull request #5106Wladimir J. van der Laan
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)
2014-10-29MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include ↵jtimon
main.h -> chain.h)
2014-10-28Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr
document it
2014-10-27MOVEONLY: core.o -> core/block.ojtimon
2014-10-27MOVEONLY: Separate CTransaction and dependencies from corejtimon
2014-10-27MOVEONLY: Move CFeeRate and Amount constants to amount.ojtimon
2014-10-22Merge pull request #4981Wladimir J. van der Laan
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)
2014-10-21Fixes for missing boost tuple.hpp header include.randy-waterhouse
2014-10-17script: add ToByteVector() for converting anything with begin/endCory Fields
This should move to a util header once their dependencies are cleaned up.
2014-10-09Merge pull request #5059Gavin Andresen
dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen) e01a793 Refactor -alertnotify code (Gavin Andresen) Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-10-09Trigger -alertnotify if network is upgrading without youGavin Andresen
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
2014-10-08Merge pull request #4834Pieter Wuille
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)
2014-10-02Replace SCRIPT_VERIFY_NOCACHE by flag directly to checkerPieter Wuille
2014-09-26Use a typedef for monetary valuesMark Friedenbach
2014-09-24Get rid of the dummy CCoinsViewCache constructor argPieter Wuille
2014-09-03Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.Pieter Wuille
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.
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-26Split up util.cpp/hWladimir J. van der Laan
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.
2014-08-23Move UpdateTime to powjtimon
2014-08-20Remove all other print() methodsWladimir J. van der Laan
All unused.
2014-08-20Remove print() from core functionsWladimir J. van der Laan
Break dependency on util.
2014-07-30Simplify and rename CheckWork to ProcessBlockFoundjtimon
2014-07-11`getrawchangeaddress` should fail when keypool exhaustedWladimir J. van der Laan
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.
2014-07-03Move fee policy out of coreGavin Andresen
2014-06-26JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>Luke Dashjr
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-25Merge pull request #3839Wladimir J. van der Laan
fd704c7 move pow constants to chainparams (jtimon) df852d2 Refactor proof of work related functions out of main (jtimon)
2014-06-24Merge pull request #4169Wladimir J. van der Laan
0655fac miner: indentation fixes, remove for (;;) (Philip Kaufmann)
2014-06-23Refactor proof of work related functions out of mainjtimon
2014-06-22miner: indentation fixes, remove for (;;)Philip Kaufmann
- change a for (;;) into while (true), as we nowhere else use the first - init nNonceFound to 0 - fix indentation in BitcoinMiner try/catch block
2014-06-22Code simplifications after CTransaction::GetHash() cachingPieter Wuille
2014-06-21Add CMutableTransaction and make CTransaction immutable.Pieter Wuille
In addition, introduce a cached hash inside CTransaction, to prevent recalculating it over and over again.
2014-06-21Switch miner.cpp to use sha2 instead of OpenSSL.Pieter Wuille
2014-06-21Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL.Pieter Wuille